[issue2506] Line tracing of continue after always-taken if is incorrect

Ned Batchelder report at bugs.python.org
Sat Mar 29 22:19:29 CET 2008


Ned Batchelder <nedbat at users.sourceforge.net> added the comment:

I recognize that this is an unusual case, but it did come up in the real
world.  I found this while measuring test coverage, and the continue
line was marked as not executed, when it was.

I don't understand "when the peepholer is moved", so maybe you are right
that this will no longer be an issue.  But it seems to me to be endemic
to code optimization to lose the one-to-one correspondence between
source lines and ranges of bytecodes.  And as the compiler becomes more
complex and performs more optmizations, problems like this will likely
increase, no?

In any case, I'd like to know more about the changes planned for the AST
and compiler...

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2506>
__________________________________


More information about the Python-bugs-list mailing list