[New-bugs-announce] [issue42645] break/continue or return in finally block occurs twice in trace.

Mark Shannon report at bugs.python.org
Tue Dec 15 07:21:32 EST 2020


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

This function

def f():
     try:
         return 2
     finally:
         4

would generate a try of [1, 2, 4, 2].  It should generate [1, 2, 4]
and not trace the return twice.

----------
assignee: Mark.Shannon
messages: 383044
nosy: Mark.Shannon, nedbat
priority: normal
severity: normal
stage: needs patch
status: open
title: break/continue or return in finally block occurs twice in trace.
type: behavior
versions: Python 3.10

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


More information about the New-bugs-announce mailing list