Message308643
__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"). |
|
Date |
User |
Action |
Args |
2017-12-19 14:11:45 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, pitrou, methane |
2017-12-19 14:11:45 | serhiy.storchaka | set | messageid: <1513692705.53.0.213398074469.issue32372@psf.upfronthosting.co.za> |
2017-12-19 14:11:45 | serhiy.storchaka | link | issue32372 messages |
2017-12-19 14:11:45 | serhiy.storchaka | create | |
|