[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: The `JUMP_ABSOLUTE` doesn't have a line number, as it doesn't correspond to any source. The jump back to the top could follow either the `if i >= 0:` or the `pass`, so cannot have a line number. Don't expect every bytecode to map directly back to the source,

[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-21 Thread Ned Batchelder
Change by Ned Batchelder : -- nosy: +Mark.Shannon, nedbat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-21 Thread Thomas Grainger
New submission from Thomas Grainger : the following code prints: import sys import dis import pprint def demo(): for i in range(1): if i >= 0: pass class Tracer: def __init__(self): self.events = [] def trace(self, frame, event, arg):