[New-bugs-announce] [issue42634] Incorrect line number in bytecode for try-except-finally

Mark Shannon report at bugs.python.org
Mon Dec 14 02:24:56 EST 2020


New submission from Mark Shannon <mark at hotpy.org>:

The following code, when traced, produces a spurious line event for line 5:

a, b, c = 1, 1, 1
try:
    a = 3
except:
    b = 5
finally:
    c = 7
assert a == 3 and b == 1 and c == 7

Bug reported by Ned Batchelder https://gist.github.com/nedbat/6c5dedde9df8d2de13de8a6a39a5f112

----------
assignee: Mark.Shannon
messages: 382958
nosy: Mark.Shannon, nedbat
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Incorrect line number in bytecode for try-except-finally
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42634>
_______________________________________


More information about the New-bugs-announce mailing list