Mark Shannon <m...@hotpy.org> added the comment:

sys.settrace line events cannot use the co_lines table. They need additional 
state, as we don't want to trace the same line twice (unless there is a 
backwards jump).

Using the start of a entry in `co_lines` doesn't work when some entries have no 
line number.
E.g.
list(co.co_lines):

(0, 2, 1)
(2, 4, None)
(4, 6, 1)

The instruction @ byte offset 4 starts an entry for line 1, but does not start 
line 1.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46817>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to