[issue13548] Invalid 'line' tracer event on pass within else clause

2016-06-02 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: The reason for this behavior is that the trace function is called whenever execution in the bytecode jumps to a new source line. See ceval.c line 4440 or so: /* If the last instruction falls at the start of a line or if it represents a jump backward

[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-12 Thread Terry J. Reedy
Terry J. Reedy 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

[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Stephan R.A. Deibel
Stephan R.A. Deibel added the comment: Sorry, the print statement in the file needs a tweak to work with Python 3.2, but the bug does occur there also. -- ___ Python tracker __

[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Ned Batchelder
Changes by Ned Batchelder : -- nosy: +nedbat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13548] Invalid 'line' tracer event on pass within else clause

2011-12-07 Thread Stephan R.A. Deibel
New submission from Stephan R.A. Deibel : The tracer set with sys.settrace() is called incorrectly with a 'line' event on a 'pass' that is at the end of an 'else' clause on the final line of a function even if the else block is not executed by the interpreter. Whew, talk about an end case! T