[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
More information about the Python-Dev mailing list
Sun Nov 17 17:18:48 CET 2013
- Previous message: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
- Next message: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 > 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. > > 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 > the liberty of sending a post to python-list at python.org <javascript:;>describing when > to use asserts, and when not to use them: > > https://mail.python.org/pipermail/python-list/2013-November/660401.html Nice post! > I will continue to use my best effort to encourage good use of > assertions in Python. Thank you! --Guido > > -- --Guido van Rossum (on iPad) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20131117/e180194b/attachment.html>
- Previous message: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
- Next message: [Python-Dev] (#19562) Asserts in Python stdlib code (datetime.py)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list