diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2021-11-30 22:37:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 22:37:04 (GMT) |
commit | 8a45ca542a65ea27e7acaa44a4c833a27830e796 (patch) | |
tree | 8cc5563159c3c11b88d0f9c9b9164ed21a9d9e7f /Doc/library/sys.rst | |
parent | af8c8caaf5e07c02202d736a31f6a2f7e27819b8 (diff) | |
download | cpython-8a45ca542a65ea27e7acaa44a4c833a27830e796.zip cpython-8a45ca542a65ea27e7acaa44a4c833a27830e796.tar.gz cpython-8a45ca542a65ea27e7acaa44a4c833a27830e796.tar.bz2 |
bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (GH-29780)
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r-- | Doc/library/sys.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 175fc09..7d1b21f 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -396,9 +396,14 @@ always available. ``(type, value, traceback)``. Their meaning is: *type* gets the type of the exception being handled (a subclass of :exc:`BaseException`); *value* gets the exception instance (an instance of the exception type); *traceback* gets - a :ref:`traceback object <traceback-objects>` which encapsulates the call - stack at the point where the exception originally occurred. - + a :ref:`traceback object <traceback-objects>` which typically encapsulates + the call stack at the point where the exception last occurred. + + .. versionchanged:: 3.11 + The ``type`` and ``traceback`` fields are now derived from the ``value`` + (the exception instance), so when an exception is modified while it is + being handled, the changes are reflected in the results of subsequent + calls to :func:`exc_info`. .. data:: exec_prefix |