Skip to content

Commit

Permalink
pythongh-102778: update documentation of PyErr_PrintEx regarding sys.…
Browse files Browse the repository at this point in the history
…last_exc
  • Loading branch information
iritkatriel committed Jun 1, 2023
1 parent 7f5afec commit c8f6fb6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Doc/c-api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ Printing and clearing
Call this function **only** when the error indicator is set. Otherwise it
will cause a fatal error!
If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`,
:data:`sys.last_value` and :data:`sys.last_traceback` will be set to the
type, value and traceback of the printed exception, respectively.
If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is
set to the printed exception. For backwards compatibility, the
deprecated variables :data:`sys.last_type`, :data:`sys.last_value` and
:data:`sys.last_traceback` will also be set to the type, value and
traceback of this exception, respectively.
.. versionchanged:: 3.12
:data:`sys.last_exc` was added.
.. c:function:: void PyErr_Print()
Expand Down

0 comments on commit c8f6fb6

Please sign in to comment.