mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)
(cherry picked from commit 1402d2ceca
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
ae819ca6fd
commit
1276e73787
1 changed files with 19 additions and 2 deletions
|
@ -175,8 +175,25 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable
|
||||||
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
|
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
|
||||||
and Ammar Askar in :issue:`43950`.)
|
and Ammar Askar in :issue:`43950`.)
|
||||||
|
|
||||||
Exceptions can be enriched with notes (PEP 678)
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
PEP 654: Exception Groups and ``except*``
|
||||||
|
-----------------------------------------
|
||||||
|
|
||||||
|
:pep:`654` introduces language features that enable a program
|
||||||
|
to raise and handle multiple unrelated exceptions simultaneously.
|
||||||
|
The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup`
|
||||||
|
make it possible to group exceptions and raise them together,
|
||||||
|
and the new :keyword:`except* <except_star>` syntax generalizes
|
||||||
|
:keyword:`except` to match subgroups of exception groups.
|
||||||
|
|
||||||
|
See :pep:`654` for more details.
|
||||||
|
|
||||||
|
(Contributed by Irit Katriel in :issue:`45292`. PEP written by
|
||||||
|
Irit Katriel, Yury Selivanov and Guido van Rossum.)
|
||||||
|
|
||||||
|
|
||||||
|
PEP 678: Exceptions can be enriched with notes
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The :meth:`add_note` method was added to :exc:`BaseException`. It can be
|
The :meth:`add_note` method was added to :exc:`BaseException`. It can be
|
||||||
used to enrich exceptions with context information which is not available
|
used to enrich exceptions with context information which is not available
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue