Message404669
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. |
|
Date |
User |
Action |
Args |
2021-10-21 21:31:52 | aroberge | set | recipients:
+ aroberge, terry.reedy |
2021-10-21 21:31:52 | aroberge | set | messageid: <1634851912.62.0.543698979656.issue45560@roundup.psfhosted.org> |
2021-10-21 21:31:52 | aroberge | link | issue45560 messages |
2021-10-21 21:31:52 | aroberge | create | |
|