[issue43163] codeop prematurely raises SyntaxError when closer is needed

Terry J. Reedy report at bugs.python.org
Mon Feb 8 15:30:51 EST 2021


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

test.test_codeop's test_incomplete is incomplete in that it tests several missing-closer single lines, like the above and "[x for x in (", all of which pass, but no corresponding multiple line snippets, like the above. The only multiple line snippets are for compound statements.  As far as I could see, the same is true for test_valid.

Are there similar tests for the REPL?  Are they more complete?  Should not both get the same tests?

----------
stage:  -> needs patch

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


More information about the Python-bugs-list mailing list