Josh Rosenberg added the comment:

That would also work. The argument I'd give in favor of performing a pass that 
replaces it with a literal True or False is that you don't have update as many 
places, don't have to worry about missing a place, and you don't have to decide 
if __debug__ is a reference to True or False, or a new object entirely.

It's just too easy to miss a case where __debug__ should be special and not 
notice (because optimizations aren't heavily tested for specific byte code 
outputs or anything), where a missed optimization for the True or False 
constant is much less likely to go unnoticed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to