[issue13548] Invalid 'line' tracer event on pass within else clause
Terry J. Reedy
report at bugs.python.org
Tue Dec 13 00:20:06 CET 2011
Terry J. Reedy <tjreedy at udel.edu> added the comment:
(Snippet examples can be made 2/3 agnostic with
from __future__ import print_function)
3.2.2 on win7, IDLE, gives me
F:\Python\mypy\tem.py 7 call
F:\Python\mypy\tem.py 8 line
F:\Python\mypy\tem.py 10 line
F:\Python\mypy\tem.py 11 line
F:\Python\mypy\tem.py 13 line
F:\Python\mypy\tem.py 13 return
...
Commenting out else:pass or changing pass to r=2 changes the output to
F:\Python\mypy\tem.py 7 call
F:\Python\mypy\tem.py 8 line
F:\Python\mypy\tem.py 10 line
F:\Python\mypy\tem.py 11 line
F:\Python\mypy\tem.py 11 return
Looking as the dis outputs of the three versions, I find the difference of behavior somewhat puzzling.
----------
nosy: +terry.reedy
versions: +Python 3.3 -Python 2.6, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13548>
_______________________________________
More information about the Python-bugs-list
mailing list