8000 update whatnew · python/cpython@2ae22e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ae22e4

Browse files
committed
update whatnew
1 parent 47bfcdc commit 2ae22e4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Doc/whatsnew/3.11.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,15 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable
157157
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya
158158
and Ammar Askar in :issue:`43950`.)
159159

160-
Exceptions can be enriched with a string ``__note__``
161-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160+
Exceptions can be enriched with notes (PEP 678)
161+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162+
163+
The :meth:`add_note` method was added to :exc:`BaseException`. It can be
164+
used to enrich exceptions with context information which is not available
165+
at the time when the exception is raised. The notes added appear in the
166+
default traceback. See :pep:`678` for more details. (Contributed by
167+
Irit Katriel in :issue:`45607`.)
162168

163-
The ``__note__`` field was added to :exc:`BaseException`. It is ``None``
164-
by default but can be set to a string which is added to the exception's
165-
traceback. (Contributed by Irit Katriel in :issue:`45607`.)
166169

167170
Other Language Changes
168171
======================

0 commit comments

Comments
 (0)
0