Skip to content

Conversation

@Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Apr 15, 2025

Brett Canon observed:

I will say the name flat_exceptions() confused me initially as a “flat exception” isn’t a thing.

and on reflection I agreed that this made sense, renaming the method to .leaf_exceptions() to match terminology from PEP-654. If this PEP is accepted, I plan to check for appropriate places to introduce the term to the exception-group tutorial and reference documentation.

Updating my GitHub search for existing uses of this name still finds zero hits. Interestingly, python-trio/exceptiongroup#13 proposed a leaf_exceptions() helper for a precursor to ExceptionGroup; I've added a footnote with some of that history.

@Zac-HD Zac-HD requested a review from gpshead as a code owner April 15, 2025 07:33
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably also worth recording the flat_exceptions name in a Rejected Ideas section.

@gpshead gpshead merged commit bdc8b83 into python:main Apr 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants