Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

add API to generate leaf exception from exceptongroup - #13

Closed
WindSoilder wants to merge 4 commits into
python-trio:masterfrom
WindSoilder:leaf_exceptions
Closed

WindSoilder wants to merge 4 commits into
python-trio:masterfrom
WindSoilder:leaf_exceptions

Conversation

@WindSoilder

Copy link
Copy Markdown
Contributor

try to resolve for issue #6

@WindSoilder
WindSoilder requested a review from njsmith January 27, 2019 08:19
@codecov

codecov Bot commented Jan 27, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #13 into master will increase coverage by 2.76%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   66.55%   69.32%   +2.76%     
==========================================
  Files          11       11              
  Lines         311      339      +28     
  Branches       28       31       +3     
==========================================
+ Hits          207      235      +28     
  Misses        101      101              
  Partials        3        3
Impacted Files Coverage Δ
exceptiongroup/_tests/test_tools.py 100% <100%> (ø) ⬆️
exceptiongroup/_tools.py 60.27% <100%> (+4.21%) ⬆️
exceptiongroup/__init__.py 100% <100%> (ø) ⬆️

@njsmith

njsmith commented Jan 27, 2019

Copy link
Copy Markdown
Member

Looks sensible to me. I'm not wild about the leaf_exceptions name, but I'm not thinking of anything better either. @oremanj and @1st1, you've both had opinions about things adjacent to this in the past, any thoughts? (You'll probably want to look at #6 for the description of what this is for.)

@njsmith
njsmith requested review from 1st1 and oremanj January 27, 2019 10:31

@oremanj oremanj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm also not wild about the name, and think the implementation looks fine. Considering that people will typically invoke this as for subexc in ExceptionGroup.<thing>(exc):, we don't necessarily need a long name. Some ideas that come to mind are expand, flatten, iterate (or maybe iter).

Comment thread exceptiongroup/_tools.py Resolved
Comment thread exceptiongroup/_tools.py Resolved
@WindSoilder

WindSoilder commented Jan 28, 2019 •

Copy link
Copy Markdown
Contributor Author

What about walk (the word comes from os.walk)?
And +1 for iterate :)

@WindSoilder WindSoilder closed this by deleting the head repository Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants