[Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
Guido van Rossum
guido at python.org
Sun Nov 17 17:18:48 CET 2013
On Saturday, November 16, 2013, Steven D'Aprano wrote:
> On Sat, Nov 16, 2013 at 11:16:48AM -0500, Donald Stufft wrote:
> > Personally I think that none of the -O* should be removing asserts. It
> > 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
> > -O* existed.
> I agree that many people misuse asserts. I agree that this is a problem
> for them. But I disagree that the solution is to remove what I consider
> to be a useful feature, and a common one in other languages, just to
> protect people from their broken code.
> I prefer to see better efforts to educate them. To that end, I've taken
> to use asserts, and when not to use them:
> I will continue to use my best effort to encourage good use of
> assertions in Python.
--Guido van Rossum (on iPad)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev