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.

classification
Title: Move runtime except: check to the parser
Type: Stage: resolved
Components: Parser Versions: Python 3.11
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, lys.nikolaou, pablogsal
Priority: normal Keywords: patch

Created on 2021-11-17 21:27 by iritkatriel, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29625 closed pablogsal, 2021-11-18 19:09
Messages (3)
msg406495 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-11-17 21:27
The compiler has a runtime check that an "except:" without type can only be the last in the try block:

https://github.com/python/cpython/blob/15409c720be0503131713e3d3abc1acd0da07378/Python/compile.c#L3251

This could be detected by the parser instead.
msg406528 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-11-18 10:05
Fantastic point, Irit! Will try to make s prototype this week
msg411012 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-20 08:17
We decided on the PR that this is not worth doing.
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 89992
2022-01-20 08:17:20iritkatrielsetstatus: open -> closed
resolution: rejected
messages: + msg411012

stage: patch review -> resolved
2021-11-18 19:09:38pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27858
2021-11-18 10:05:20pablogsalsetmessages: + msg406528
2021-11-17 21:27:57iritkatrielcreate