I love assert
ethan at stoneleaf.us
Mon Nov 17 04:25:05 CET 2014
-----BEGIN PGP SIGNED MESSAGE-----
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?
> 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Python-list