[issue32372] Optimize out __debug__ at the AST level

2017-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32372] Optimize out __debug__ at the AST level

2017-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3dfbaf51f0d90646e0414ddbd3b513ee8e5ffe9b by Serhiy Storchaka in branch 'master': bpo-32372: Move __debug__ optimization to the AST level. (#4925)

[issue32372] Optimize out __debug__ at the AST level

2017-12-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4819 stage: -> patch review ___ Python tracker ___

[issue32372] Optimize out __debug__ at the AST level

2017-12-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : __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