This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients methane, pitrou, rhettinger, serhiy.storchaka
Date 2017-12-19.14:11:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513692705.53.0.213398074469.issue32372@psf.upfronthosting.co.za>
In-reply-to
Content
__debug__ is substituted by the constant value at the code generation stage (see issue27169). This prevents it from participating in constant folding at the AST level. The proposed patch moves this optimization to the AST level. This will lead to optimizing "if not __debug__" and will allow to add more optimizations at the AST level (like optimizing expressions "a if __debug__ else b" and "__debug__ and a").
History
Date User Action Args
2017-12-19 14:11:45serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, pitrou, methane
2017-12-19 14:11:45serhiy.storchakasetmessageid: <1513692705.53.0.213398074469.issue32372@psf.upfronthosting.co.za>
2017-12-19 14:11:45serhiy.storchakalinkissue32372 messages
2017-12-19 14:11:45serhiy.storchakacreate