Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80959

Re: I love assert

Date 2014-11-16 19:25 -0800
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: I love assert
References (4 earlier) <5465e887$0$12976$c3e8da3$5496439d@news.astraweb.com> <mailman.15827.1415989114.18130.python-list@python.org> <5466c13d$0$13009$c3e8da3$5496439d@news.astraweb.com> <mailman.15842.1416024588.18130.python-list@python.org> <546958ca$0$12976$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.15945.1416194716.18130.python-list@python.org> (permalink)

Show all headers | View raw


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/16/2014 06:09 PM, Steven D'Aprano wrote:
> Ethan Furman wrote:
>> On 11/14/2014 06:58 PM, Steven D'Aprano wrote:
>>> Ethan Furman wrote:
>>>> 
>>>> My point being:  a safety net that is so easily disabled does not count (IMHO) as a backup.
>>> 
>>> Assertions are not a backup or a safety net. [...]
>> 
>> Would you be happier if I phrased that as: Defensive programming techniques that can be unknowingly disabled by
>> the end-user aren't very helpful?
> 
> No.
> 
> You appear to be labouring under the misapprehension that assertion-based techniques (such as design by contract)
> are a technique for guarding against expected errors in (say) data.

I believe we are in violent agreement here.  My hissy-fit is not on the correct use of asserts, but their incorrect use.

- --
~Ethan~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJUaWqRAAoJENZ7D1rrH75N5pAQAKTiuIMWSpVYX80XdyPh036f
7FTvIerwaCtxwhBG2ma5GKQSXLIPIp6n6LQopnIN6Y82Odx6CqtUmlOpbrxZ4L5w
HG+GaCgBKPCP43ghP8NV+IDNK+mpz3g8uqa3F7ofgygDiBUqXg07/aBR2Eifkyl2
yoB9OjwRek2/m+KkUxe+hnEAmNjeyHF1+0rpFkjf04c4O38/fXJ2Gv6aoluoc/on
IdmST56ukgcVU9JjTTLD+PhLA8v/uvTHyFFQvGng9cUTIMxJEvItIikp+20VS1CP
PY8xJabI28TA4IEtC3atMwk/bDme2H6ovv0O0yvYswF38Y0u6U+NpNgKYUZfXKwS
nFHIJMFSfFpWddmxUGCNmjvGlDRVH5py11QGEl430PhUr3Y5re4MUglye9lFWoy9
NwSVA4c6zoM4lrgdZ2qzzDX8LUaLr1c//sNvS+kVaI6syIf0C60++QJGBboauIMR
lprJ65FfmiHhfI9e+7sS5KX09iILkuPjnwGi79CJG/TehfFcvueqDjNzRan8JzVX
/Czo3zwBK8B4cV13DBeRP2oaJcreMvA5bysXXKJ7iqZkLST+K8hiFpoKCGZiGdcZ
OBafvCwMqP5GzuCCzBxwAOIPo4KHR+KDVMarLZ+NI2kebZPTgKmWmtPrIIztTxE0
DFNrXUK0o8z0WGKP2Ke6
=tM/a
-----END PGP SIGNATURE-----

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I love assert Peter Cacioppi <peter.cacioppi@gmail.com> - 2014-11-11 11:40 -0800
  Re: I love assert Ben Finney <ben+python@benfinney.id.au> - 2014-11-12 07:03 +1100
    Re: I love assert Grant Edwards <invalid@invalid.invalid> - 2014-11-11 21:43 +0000
  Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-11 12:08 -0800
  Re: I love assert Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-11-11 12:20 -0800
  Re: I love assert Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-11 20:34 +0000
  Re: I love assert TP <wingusr@gmail.com> - 2014-11-11 12:57 -0800
  Re: I love assert Terry Reedy <tjreedy@udel.edu> - 2014-11-11 17:34 -0500
  Re: I love assert Ben Finney <ben+python@benfinney.id.au> - 2014-11-12 09:52 +1100
  Re: I love assert Tim Chase <python.list@tim.thechases.com> - 2014-11-11 17:03 -0600
  Re: I love assert Peter Cacioppi <peter.cacioppi@gmail.com> - 2014-11-11 15:02 -0800
  Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-11 15:38 -0800
  Re: I love assert Dan Stromberg <drsalists@gmail.com> - 2014-11-11 17:56 -0800
  Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-12 13:21 +1100
  Re: I love assert Ben Finney <ben+python@benfinney.id.au> - 2014-11-12 13:35 +1100
    Re: I love assert Grant Edwards <invalid@invalid.invalid> - 2014-11-12 14:10 +0000
  Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-12 13:44 +1100
    Re: I love assert wxjmfauth@gmail.com - 2014-11-11 23:14 -0800
  Re: I love assert Terry Reedy <tjreedy@udel.edu> - 2014-11-12 03:29 -0500
  Re: I love assert Anton <anton.schattenfeld@gmail.com> - 2014-11-12 12:53 -0800
    Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-12 23:41 +0200
      Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-12 13:52 -0800
        Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-12 23:56 +0200
          Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 15:04 -0700
            Re: I love assert Anton <anschatten@gmail.com> - 2014-11-12 14:13 -0800
              Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 15:41 -0700
                Re: I love assert Anton <anschatten@gmail.com> - 2014-11-12 14:48 -0800
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 01:01 +0200
                Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-15 10:40 +1100
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 02:12 +0200
                Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-15 12:04 +1100
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 03:30 +0200
                Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-15 12:48 +1100
                Re: I love assert Tim Chase <python.list@tim.thechases.com> - 2014-11-14 20:14 -0600
                Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-15 13:16 +1100
                Re: I love assert albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-11-29 17:35 +0000
                Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 16:02 -0700
                Re: I love assert Anton <anschatten@gmail.com> - 2014-11-12 15:43 -0800
                Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-13 10:10 +1100
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 01:23 +0200
                Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-13 10:27 +1100
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 01:31 +0200
              Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-12 14:47 -0800
                Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-14 22:37 +1100
                Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-14 09:40 -0700
          Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 15:07 -0700
            Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 00:47 +0200
              Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-12 14:56 -0800
              Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-13 09:58 +1100
              Re: I love assert Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 16:05 -0700
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 01:12 +0200
              Re: I love assert Lie Ryan <lie.1296@gmail.com> - 2014-11-14 01:09 +1100
        Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-14 22:33 +1100
          Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-14 10:18 -0800
            Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-14 21:12 +0200
              Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-14 12:41 -0800
                Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-14 22:50 +0200
            Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-15 13:58 +1100
              Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-14 20:09 -0800
                Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-17 13:09 +1100
                Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-16 19:25 -0800
      Re: I love assert Anton <anschatten@gmail.com> - 2014-11-12 14:00 -0800
        Re: I love assert Anton <anschatten@gmail.com> - 2014-11-12 14:04 -0800
          Re: I love assert Marko Rauhamaa <marko@pacujo.net> - 2014-11-13 00:34 +0200
    Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-13 09:43 +1100
  Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-14 22:15 +1100
  Re: I love assert Richard Riehle <rriehle@itu.edu> - 2014-11-14 14:09 -0800
    Decorators (was: Re: I love assert) Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 00:18 +0200
      Re: Decorators Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-14 22:37 +0000
        Re: Decorators Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 00:47 +0200
      Re: Decorators (was: Re: I love assert) Richard Riehle <rriehle@itu.edu> - 2014-11-14 18:19 -0800
        Re: Decorators (was: Re: I love assert) Mayank Tripathi <oquanox@gmail.com> - 2014-11-15 02:36 +0000
        Re: Decorators (was: Re: I love assert) Tim Chase <python.list@tim.thechases.com> - 2014-11-14 20:30 -0600
          Re: Decorators Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 09:00 +0200
            Re: Decorators Grant Edwards <invalid@invalid.invalid> - 2014-11-15 15:32 +0000
        Re: Decorators (was: Re: I love assert) Richard Riehle <rriehle@itu.edu> - 2014-11-14 23:42 -0800
        Re: Decorators Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-15 13:12 +0000
          Re: Decorators Marko Rauhamaa <marko@pacujo.net> - 2014-11-15 15:24 +0200
            Re: Decorators Terry Reedy <tjreedy@udel.edu> - 2014-11-15 15:28 -0500
        Re: Decorators (was: Re: I love assert) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-16 02:39 +1100
  Re: I love assert TP <wingusr@gmail.com> - 2014-11-27 01:22 -0800
    Re: I love assert alister <alister.nospam.ware@ntlworld.com> - 2014-11-27 09:59 +0000
      Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-29 12:30 +1100
        Re: I love assert MRAB <python@mrabarnett.plus.com> - 2014-11-29 02:56 +0000
          Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-29 20:31 +1100
            Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-29 21:40 +1100
            Re: I love assert MRAB <python@mrabarnett.plus.com> - 2014-11-29 19:49 +0000
        Re: I love assert Chris Angelico <rosuav@gmail.com> - 2014-11-29 14:02 +1100
        Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-29 14:33 -0800
          Re: I love assert Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-30 19:18 +1100
            Re: I love assert Ethan Furman <ethan@stoneleaf.us> - 2014-11-30 11:34 -0800

csiph-web