[issue40546] Inconsistencies between PEG parser and traceback SyntaxErrors

Guido van Rossum report at bugs.python.org
Thu May 7 14:08:07 EDT 2020


Guido van Rossum <guido at python.org> added the comment:

For example:

raise SyntaxError("message", ("<file>", 1, 3, "text"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<file>", line 1
    text
      ^
SyntaxError: message
>>> 

(I can't find docs for the constructor of SyntaxError objects. We should update the docs.)

----------

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


More information about the Python-bugs-list mailing list