Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-45292: [PEP-654] add except* #29581
bpo-45292: [PEP-654] add except* #29581
Changes from all commits
b0ca0b7cad9126798aaa7f95272cca44878adc834de3fa2f71908fd85846329f9a626cfdc948b488f9fa4eff693211d6da03dbf43704bc8fff36e5d73ee29451e817850a21261d9969d4a7bf9f3ad5d4128133637e548055736f1582a4db3a461e7dbe609b3706e54b7f49575ae729f338e3b50ee53c8d9c188627428b15bbe44fb22bf20766d830af2b74a5035fe5c5d52de3a1591f0ce3621120d9ccd3a642e613e0d0f078f050a91b219564b8a0File filter
Conversations
Jump to
There are no files selected for viewing
gvanrossumNov 25, 2021
Member
I've come to the conclusion that the sooner we replace triples with single exception objects the better. :-)
gvanrossumNov 17, 2021
Member
I wonder if the "invalid" rules shouldn't be shared between
exceptandexcept*. I also suspect that we may want to emit a custom error when users mixexceptandexcept*.iritkatrielNov 17, 2021
•
edited
Author
Member
A related comment: I think this check that "except:" is the last clause can move to the parser:
cpython/Python/compile.c
Line 3251 in 15409c7
But I don't think we should make changes to except (non-star) in this PR.
(note that we do not allow "except*:" at all).
iritkatrielNov 17, 2021
Author
Member
I've updated the parser as suggested and created bpo45834 for moving the 'except:' error to the parser.
Some generated files are not rendered by default. Learn more.
Some generated files are not rendered by default. Learn more.