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
wants to merge 4 commits into from
Closed

add API to generate leaf exception from exceptongroup #13

wants to merge 4 commits into from

Conversation

WindSoilder
Copy link
Contributor

try to resolve for issue #6

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

codecov bot commented Jan 27, 2019

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
Copy link
Member

njsmith commented Jan 27, 2019

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
Copy link
Member

@oremanj oremanj left a comment

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).

@WindSoilder
Copy link
Contributor Author

WindSoilder commented Jan 28, 2019

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