New submission from Andre Roberge <andre.robe...@gmail.com>:
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. ---------- assignee: terry.reedy components: IDLE messages: 404669 nosy: aroberge, terry.reedy priority: normal severity: normal status: open title: sys.last_* not set for SyntaxErrors with IDLE versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45560> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com