File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,14 @@ Printing and clearing
60
60
Call this function **only** when the error indicator is set. Otherwise it
61
61
will cause a fatal error!
62
62
63
- If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`,
64
- :data:`sys.last_value` and :data:`sys.last_traceback` will be set to the
65
- type, value and traceback of the printed exception, respectively.
63
+ If *set_sys_last_vars* is nonzero, the variable :data:`sys.last_exc` is
64
+ set to the printed exception. For backwards compatibility, the
65
+ deprecated variables :data:`sys.last_type`, :data:`sys.last_value` and
66
+ :data:`sys.last_traceback` will also be set to the type, value and
67
+ traceback of this exception, respectively.
68
+
69
+ .. versionchanged:: 3.12
70
+ :data:`sys.last_exc` was added.
66
71
67
72
68
73
.. c:function:: void PyErr_Print()
You can’t perform that action at this time.
0 commit comments