[issue40848] compile() can compile a bare starred expression with `PyCF_ONLY_AST` flag with the old parser, but not the new one

Pablo Galindo Salgado report at bugs.python.org
Wed Jun 3 02:22:40 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Yeah, this is not a bug as Serhiy points out. Regarding the error message, we are currently working on trying to unify the error messages in the the parser as much as we can but there is also no promise that they will match 100%.

Many grammar checks currently are done outside the parser (we mention it on  PEP617) so I am not surprised that the old parser is ok with some invalid expressions and PyCF_ONLY_AST. This is one of the things we are trying to change with the new parser precisely.

I will close for now as "not a bug". Feel free to reopen if you think we missed something or if something was left to discuss.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list