Andre Roberge <andre.robe...@gmail.com> added the comment:

I can confirm that, if the existing line

type, value, tb = sys.exc_info()

in pyshell.ModifiedInterpreter.showsyntaxerror is replaced by

e_type, value, tb = sys.exc_info()
err = str((type(e_type).__name__, *value)+'\n'
linecache.cache["<SyntaxError>"] = (len(err), 0, [err], "<SyntaxError>")

then all the required information to analyze the cause of the error can be 
retrieved using rpc.

====
Aside: In doing various tests, I noticed that "IndentationError" are simply 
reported as "SyntaxError" in Idle, since at least Python 3.6.
This is just a cosmetic issue.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43476>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to