Python Software Foundation News: The 2021 Python Language Su

Python Software Foundation News: The 2021 Python Language Su

Python Software Foundation News: The 2021 Python Language Summit: PEP 654 — Exception Groups and except*


  News from the Python Software Foundation
Saturday, May 15, 2021
The 2021 Python Language Summit: PEP 654 Exception Groups and except
PEP 654 was authored by Irit Katriel, Yury Selivanov, and Guido van Rossum. This PEP is currently at the draft stage. The authors shared what it is, why we need it, and which ideas they rejected.
 
What Is PEP 654?
The purpose of this PEP is to help Python users handle unrelated exceptions. Right now, if you re dealing with several unrelated exceptions, you can:
Raise one exception and throw away the others, in which case you re losing exceptions
Return a list of exceptions instead of raising them, in which case they become error codes rather than exceptions, so you can t handle them with exception-handling mechanisms

Related Keywords

Irit Katriel, Yury Selivanov, Guido Van Rossum, ,