[Python-checkins] r60265 - in python/trunk: Lib/test/test_grammar.py Python/compile.c
Neal Norwitz
nnorwitz at gmail.com
Fri Jan 25 00:01:16 CET 2008
On Jan 24, 2008 2:51 PM, amaury.forgeotdarc <python-checkins at python.org> wrote:
> Author: amaury.forgeotdarc
> Date: Thu Jan 24 23:51:18 2008
> New Revision: 60265
>
> Modified:
> python/trunk/Lib/test/test_grammar.py
> python/trunk/Python/compile.c
> Log:
> #1920: when considering a block starting by "while 0", the compiler optimized the
> whole construct away, even when an 'else' clause is present::
>
> while 0:
> print("no")
> else:
> print("yes")
>
> did not generate any code at all.
>
> Now the compiler emits the 'else' block, like it already does for 'if' statements.
Since this change affects byte code generation, the import magic #
should be updated for 2.6. We can't update the magic for 2.5. For
more info see Python/import.c or PEP 339.
n
More information about the Python-checkins
mailing list