Skip to content

Commit 232d87b

Browse files
committed
pythongh-95914: add paragraph about pep 654 in main body of 'what's new in 3.11'
1 parent b5e3ea2 commit 232d87b

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

Doc/whatsnew/3.11.rst

+21-2
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,33 @@ 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+
Exception Groups and ``except*`` (PEP 654)
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+
The new ``except*`` syntax generalizes ``except`` to match subgroups
187+
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+
179194
Exceptions can be enriched with notes (PEP 678)
180195
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181196

182197
The :meth:`add_note` method was added to :exc:`BaseException`. It can be
183198
used to enrich exceptions with context information which is not available
184199
at the time when the exception is raised. The notes added appear in the
185-
default traceback. See :pep:`678` for more details. (Contributed by
186-
Irit Katriel in :issue:`45607`.)
200+
default traceback.
201+
202+
See :pep:`678` for more details.
203+
204+
(Contributed by Irit Katriel in :issue:`45607`. PEP written by
205+
Zac Hatfield-Dodds.)
187206

188207

189208
.. _new-feat-related-type-hints-311:

0 commit comments

Comments
 (0)