Message97631
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 of the first expression).
The attached patch allow Python to detect some more constant expression, and to optimise test like the following:
if __debug__ and x:
pass
if not __debug__:
pass |
|
Date |
User |
Action |
Args |
2010-01-12 12:22:03 | sdefresne | set | recipients:
+ sdefresne |
2010-01-12 12:22:03 | sdefresne | set | messageid: <1263298923.43.0.408416060324.issue7682@psf.upfronthosting.co.za> |
2010-01-12 12:22:01 | sdefresne | link | issue7682 messages |
2010-01-12 12:22:01 | sdefresne | create | |
|