PyCon UK 2022

Exception Groups and except*
09-16, 13:30–14:00 (Europe/London), Assembly Room

Python 3.11 introduces new features that make it possible to raise and handle multiple unrelated exceptions. This talk briefly covers what they do and how they work, and answers a frequently asked question: why we needed to add new language syntax to handle exception groups.


Python 3.11 introduces new features that make it possible to raise and handle multiple unrelated exceptions at the same time (see PEP 654). This talk, given by one of the authors of PEP 654, will describe how they work and some of the design decisions we made while developing these features. In particular, why we needed to add the new syntax except* to handle exception groups.

I am a CPython Core Developer and a member of Microsoft's faster-cpython team. My work focuses on the interpreter core.

Among my contributions to Python 3.11 are the implementation of PEP 654 (Exception Groups and except*) and PEP 678 (exception notes). In addition, I worked on a number of non-functional changes to optimise and simplify the interpreter's exception handling.