This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Optimise try-except code generation for the happy path
Type: performance Stage: resolved
Components: Interpreter Core Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: iritkatriel Nosy List: iritkatriel
Priority: normal Keywords: patch

Created on 2022-01-21 15:26 by iritkatriel, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30751 merged iritkatriel, 2022-01-21 15:48
Messages (5)
msg411137 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-21 15:26
The compiler emits code for try-except-else-finally in the order in which it appears in the source, but it could probably produce faster code if it optimizes for the no-exception path.
msg411141 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-21 16:02
See also the discussion on
msg411871 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-27 13:41
New changeset 3d2ce3471646704ebd5252f4b20f065f139a53b1 by Irit Katriel in branch 'main':
bpo-46458: emit code for else of a try block immediately after the try body (GH-30751)
msg412031 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-28 20:42
New changeset 36f538c8092eeb3d5b8bc9df0ae7cc348f08a865 by Irit Katriel in branch 'main':
bpo-46458: Add tests for context of exception in finally block (GH-30986)
msg412069 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-29 10:15
Re next steps, see
Date User Action Args
2022-04-11 14:59:55adminsetgithub: 90616
2022-01-29 10:15:11iritkatrielsetstatus: open -> closed
resolution: fixed
messages: + msg412069

stage: patch review -> resolved
2022-01-28 20:42:25iritkatrielsetmessages: + msg412031
2022-01-28 15:46:48iritkatrielsetpull_requests: - pull_request29165
2022-01-28 11:34:37iritkatrielsetpull_requests: + pull_request29165
2022-01-27 13:41:14iritkatrielsetmessages: + msg411871
2022-01-21 16:02:10iritkatrielsetmessages: + msg411141
2022-01-21 15:48:24iritkatrielsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28938
2022-01-21 15:26:03iritkatrielcreate