This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Abraham Karplus
Recipients Abraham Karplus
Date 2012-11-30.18:14:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za>
In-reply-to
Content
When a callback function gets called from Tkinter and raises SystemExit (either directly or through sys.exit), a new SystemExit exception is raised with the original exception as its code field, such as
SystemExit(SystemExit(),)
This is due to a bug in Tkinter's CallWrapper, where it has
except SystemExit as msg:
    raise SystemExit(msg)
which since msg is a SystemExit instance, creates the nesting. This bug did not exist in Python 2 because there the code was
except SystemExit, msg:
    raise SystemExit, msg
and this raises msg, as it already is a SystemExit instance. I suspect the bug was introduced by using the 2to3 tool, as it will do the conversion. If so, this is a bug in 2to3, as the two snippets are not functionally identical.
History
Date User Action Args
2012-11-30 18:14:44Abraham Karplussetrecipients: + Abraham Karplus
2012-11-30 18:14:43Abraham Karplussetmessageid: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za>
2012-11-30 18:14:43Abraham Karpluslinkissue16583 messages
2012-11-30 18:14:43Abraham Karpluscreate