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 aroberge
Recipients aroberge, terry.reedy
Date 2021-10-21.21:31:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
In-reply-to
Content
As stated in the documentation, sys.last_type, sys.last_value and sys.last_traceback ... are set when an exception is not handled and the interpreter prints an error message and a stack traceback.

This is true whether the exception is a SyntaxError or some runtime error when a standard Python interpreter is used.

However, when the IDLE shell is used and a SyntaxError occurs, these are not set.  If it is not possible to change this behaviour in IDLE, perhaps the documentation of the sys module should be amended to include this information.
History
Date User Action Args
2021-10-21 21:31:52arobergesetrecipients: + aroberge, terry.reedy
2021-10-21 21:31:52arobergesetmessageid: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org>
2021-10-21 21:31:52arobergelinkissue45560 messages
2021-10-21 21:31:52arobergecreate