[Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
Antoine Pitrou
solipsis at pitrou.net
Sat Nov 16 17:34:58 CET 2013
On Sat, 16 Nov 2013 11:16:48 -0500
Donald Stufft <donald at stufft.io> wrote:
> Personally I think that none of the -O* should be removing asserts. It feels
> like a foot gun to me. I’ve seen more than one codebase that would be
> completely broken under -O* because they used asserts without even knowing
> -O* existed.
Originally it was probably done so as to mimick C, where compiling in
optimized mode will indeed disable any assert()s in the code.
Regards
Antoine.
More information about the Python-Dev
mailing list