Skip to content

Commit d1e4917

Browse files
authored
gh-102778: IDLE - make sys.last_exc available in Shell after traceback (#103314)
--------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
1 parent f4d0879 commit d1e4917

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Lib/idlelib/run.py

+1
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def print_exception():
239239
efile = sys.stderr
240240
typ, val, tb = excinfo = sys.exc_info()
241241
sys.last_type, sys.last_value, sys.last_traceback = excinfo
242+
sys.last_exc = val
242243
seen = set()
243244

244245
def print_exc(typ, exc, tb):
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Support ``sys.last_exc`` in :mod:`idlelib`.

0 commit comments

Comments
 (0)