[issue43476] Enabling access to showsyntaxerror for IDLE's shell

Terry J. Reedy report at bugs.python.org
Sat Jun 19 22:21:31 EDT 2021


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

The comment should be "# For 3rd party use.  See issue 43476."
Updates to the pypi url, now https://pypi.org/project/friendly/ should be recorded here on this issue. 

The undocumented name 'cache' is excluded from linecache.__all__ and therefore private.  We use it at our own risk (which should be extremely minimal).

I cannot think of anyway that adding another '<...>' pseudoname entry could hurt.  The only possibility is adding another copy of an entry, but they are small.

But are you sure that this is value for the key?  We could instead make the pseudotext be anything we want, such as a serialized version of the exception instance itself, including the error line.  Why reproduce the error instead of fetching it?  (If you do reproduce, you have to make sure you use the same compile options.)

----------
versions: +Python 3.11

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


More information about the Python-bugs-list mailing list