[issue42803] Traced line number is wrong for "if not __debug__"

2021-01-04 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue42803] Traced line number is wrong for "if not __debug__"

2021-01-02 Thread Ned Batchelder
Ned Batchelder added the comment: I think I am finding more examples of the same problem, so I will just add it here: x = "hello" try: 3/0 except ZeroDivisionError: if x == 'raise': raise ValueError() # line 6 f = 7 This shows a trace for line 6,

[issue42803] Traced line number is wrong for "if not __debug__"

2021-01-02 Thread Ned Batchelder
Ned Batchelder added the comment: This might be the same problem as #42810. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42803] Traced line number is wrong for "if not __debug__"

2021-01-01 Thread Ned Batchelder
New submission from Ned Batchelder : (Using CPython commit 6b1ac809b9) This program never executes line 4, but the "if not __debug__" is partly attributed to line 4, giving an incorrect trace: for value in [True, False]: if value: if not __debug__: 1/0