Skip to content

Commit 16abdaf

Browse files
gpsheadclaude
andcommitted
Fix missing file=efile in IDLE's ExceptionGroup cycle-detection output
The print call for the "exception has printed" message in print_exc_group was writing to stdout instead of stderr. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1010bca commit 16abdaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/idlelib/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def print_exc_group(typ, exc, tb, prefix=""):
280280
print_exc(type(sub), sub, sub.__traceback__, prefix + " ")
281281
need_print_underline = not isinstance(sub, BaseExceptionGroup)
282282
else:
283-
print(f"{prefix2} | <exception {type(sub).__name__} has printed>")
283+
print(f"{prefix2} | <exception {type(sub).__name__} has printed>", file=efile)
284284
need_print_underline = True
285285
need_print_underline *= (i == len(exc.exceptions))
286286
if need_print_underline:

0 commit comments

Comments
 (0)