On 28.11.2017 5:19, Chris Angelico wrote:

Actually, Python does have a way of disabling assertions (the -O
flag), so they should be treated the same way they are in C.
Assertions should not be used as shorthands for "if cond: raise Exc"
in the general case.
I'm claiming, and provided evidence, that there are no use cases for this in Python, so no-one (of any significance) will suffer when the disabling is cut out. In any case, we will probably do it with a __future__ statement for a transitional period.

--
Regards,
Ivan

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to