[Python-ideas] for/else syntax

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 3 03:51:13 CEST 2009

Steven D'Aprano wrote:

> It's even more problematic when you consider code where the break is 
> inside a "if __debug__" clause. Then you've code which raises a warning 
> when you run with the -O flag, and doesn't when you run without.

Not necessarily -- the decision to issue the warning could
be made at an earlier stage of processing than the one that
optimises away the if.


More information about the Python-ideas mailing list