Skip to content

Commit 1402d2c

Browse files
authored
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)
1 parent f07adf8 commit 1402d2c

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

Doc/whatsnew/3.11.rst

+19-2
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,25 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable
176176
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
177177
and Ammar Askar in :issue:`43950`.)
178178

179-
Exceptions can be enriched with notes (PEP 678)
180-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179+
180+
PEP 654: Exception Groups and ``except*``
181+
-----------------------------------------
182+
183+
:pep:`654` introduces language features that enable a program
184+
to raise and handle multiple unrelated exceptions simultaneously.
185+
The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup`
186+
make it possible to group exceptions and raise them together,
187+
and the new :keyword:`except* <except_star>` syntax generalizes
188+
:keyword:`except` to match subgroups of exception groups.
189+
190+
See :pep:`654` for more details.
191+
192+
(Contributed by Irit Katriel in :issue:`45292`. PEP written by
193+
Irit Katriel, Yury Selivanov and Guido van Rossum.)
194+
195+
196+
PEP 678: Exceptions can be enriched with notes
197+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181198

182199
The :meth:`add_note` method was added to :exc:`BaseException`. It can be
183200
used to enrich exceptions with context information which is not available

0 commit comments

Comments
 (0)