Title: break/continue or return in finally block occurs twice in trace.
Type: behavior Stage: resolved
Components: Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Mark.Shannon Nosy List: Mark.Shannon, nedbat
Priority: normal Keywords: patch

Created on 2020-12-15 12:21 by Mark.Shannon, last changed 2020-12-17 13:56 by Mark.Shannon. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23780 merged Mark.Shannon, 2020-12-15 15:42
Messages (2)
msg383044 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2020-12-15 12:21
This function

def f():
         return 2

would generate a try of [1, 2, 4, 2].  It should generate [1, 2, 4]
and not trace the return twice.
msg383165 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2020-12-16 13:07
New changeset 5274b682bc93a04da8a69742528ac7f64633a96e by Mark Shannon in branch 'master':
bpo-42645: Make sure that return/break/continue are only traced once when exiting via a finally block. (GH-23780)
Date User Action Args
2020-12-17 13:56:51Mark.Shannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-12-16 13:07:11Mark.Shannonsetmessages: + msg383165
2020-12-15 15:42:24Mark.Shannonsetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request22638
2020-12-15 12:21:32Mark.Shannoncreate