gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback (#102779)

This commit is contained in:
Irit Katriel 2023-03-18 11:47:11 +00:00 • committed by GitHub
parent 039714d00f
commit e1e9bab006
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 103 additions and 36 deletions

View file

@ -2400,6 +2400,7 @@ class Tk(Misc, Wm):
should when sys.stderr is None."""
import traceback
print("Exception in Tkinter callback", file=sys.stderr)
sys.last_exc = val
sys.last_type = exc
sys.last_value = val
sys.last_traceback = tb