[issue3275] Control flow not optimized

2008-07-04 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: What real-life use case do you have for a condition that is a boolean operation on two constant values anyway? Things like while 1: ... are properly optimized since they serve a useful purpose. -- nosy: +georg.brandl _

[issue3275] Control flow not optimized

2008-07-03 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: A patch for this was just recently rejected. See #1394. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue3275] Control flow not optimized

2008-07-03 Thread Daniel Colascione
New submission from Daniel Colascione <[EMAIL PROTECTED]>: Consider: import dis def foo(): if 0 and 1: return "hi" dis.dis(foo) What I get is 2 0 LOAD_CONST 1 (0) 3 JUMP_IF_FALSE 15 (to 21) 6 POP_TOP