[issue7682] Optimisation of if with constant expression

2019-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was optimized in 3.7. See issue27169 and issue30501. -- nosy: +serhiy.storchaka resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue7682] Optimisation of if with constant expression

2012-09-06 Thread STINNER Victor
STINNER Victor added the comment: I'm working on a different approach: an AST optimizer. It is already able to replace "if __debug__ and x: " with "if x: ..." ("pythonenv" option must be enabled). https://bitbucket.org/haypo/astoptimizer/ -- nosy: +haypo __

[issue7682] Optimisation of if with constant expression

2010-03-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> normal stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
Sylvain Defresne added the comment: Correct version of the patch. -- Added file: http://bugs.python.org/file15837/compile.diff ___ Python tracker ___

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
Changes by Sylvain Defresne : Removed file: http://bugs.python.org/file15836/compile.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7682] Optimisation of if with constant expression

2010-01-12 Thread Sylvain Defresne
New submission from Sylvain Defresne : Python compiler detect some constant expression used in if / while statement and evaluate them at compilation. However, it does not perform some simple optimisation (evaluating not unary expression or checking if and or or expression are constant because