Skip to content

Commit 4e89e2b

Browse files
Carreaumeeseeksmachine
authored andcommitted
Backport PR ipython#14684: Add sys.last_exc
1 parent e81b38a commit 4e89e2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

IPython/core/interactiveshell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,6 +2093,8 @@ def _get_exc_info(self, exc_tuple=None):
20932093
sys.last_type = etype
20942094
sys.last_value = value
20952095
sys.last_traceback = tb
2096+
if sys.version_info >= (3, 12):
2097+
sys.last_exc = value
20962098

20972099
return etype, value, tb
20982100

0 commit comments

Comments
 (0)