[issue43366] Unclosed bracket bug in code.interact prevents identifying syntax errors
Pablo Galindo Salgado
report at bugs.python.org
Fri Mar 5 20:24:08 EST 2021
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
In any case, the underlying problem here is the fact that codeop is deciding to continue asking for input of not depending on the repr() of the syntax error exception itself, which is the major hack here.
Previously, it worked because for unclosed parens the parser was throwing different line numbers for the end of file as codeop keeps adding new lines, but now all these points to the same unclosed paren.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43366>
_______________________________________
More information about the Python-bugs-list
mailing list