16 Nov
2013
16 Nov
'13
6:47 p.m.
On Sat, Nov 16, 2013 at 3:51 AM, Terry Reedy
http://bugs.python.org/issue19562 propose to change the first assert in Lib/datetime.py assert 1 <= month <= 12, month to assert 1 <= month <= 12,'month must be in 1..12' to match the next two asserts out of the *53* in the file. I think that is the wrong direction of change, but that is not my question here.
Should stdlib code use assert at all?
If user input can trigger an assert, then the code should raise a normal exception that will not disappear with -OO.
May I assert that -OO should instead be killed?