[issue45560] sys.last_* not set for SyntaxErrors with IDLE

Terry J. Reedy report at bugs.python.org
Thu Oct 21 21:16:03 EDT 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The method to run just code in userspace, without involving the debugger or history list, is runcommand.  It needs a code string.  The hard part is the code needed to recreate the exception instance in the user space.  It will be different for SyntaxError versus the other error possible when compiling.  The SE details tuple has a mix of strs and ints.  I believe I know in principle how to do it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45560>
_______________________________________


More information about the Python-bugs-list mailing list