Skip to content

Commit 1276e73

Browse files
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)
(cherry picked from commit 1402d2c) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent ae819ca commit 1276e73

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
@@ -175,8 +175,25 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable
175175
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
176176
and Ammar Askar in :issue:`43950`.)
177177

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

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

0 commit comments

Comments
 (0)