Skip to content
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

[PEP-654] add None check in subgroup example #2132

Merged
merged 2 commits into from
Nov 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pep-0654.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,9 @@ OS errors, while letting all other exceptions propagate.
try:
low_level_os_operation()
except* OSError as errors:
raise errors.subgroup(lambda e: e.errno != errno.EPIPE) from None
exc = errors.subgroup(lambda e: e.errno != errno.EPIPE)
if exc is not None:
raise exc from None


Caught Exception Objects
Expand Down Expand Up @@ -1478,7 +1480,7 @@ ways, both the design and the exposition. For this we appreciate all those who
contributed ideas and asked good questions: Ammar Askar, Matthew Barnett,
Ran Benita, Emily Bowman, Brandt Bucher, Joao Bueno, Baptiste Carvello,
Rob Cliffe, Nick Coghlan, Steven D'Aprano, Caleb Donovick, Steve Dower,
Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Thomas Grainger,
Greg Ewing, Ethan Furman, Pablo Salgado, Jonathan Goble, Joe Gottman, Thomas Grainger,
Larry Hastings, Zac Hatfield-Dodds, Chris Jerdonek, Jim Jewett, Sven Kunze,
Łukasz Langa, Glenn Linderman, Paul Moore, Antoine Pitrou, Ivan Pozdeev,
Patrick Reader, Terry Reedy, Sascha Schlemmer, Barry Scott, Mark Shannon,
Expand Down