[Python-Dev] Disallow ambiguous syntax f(x for x in [1],)

Ivan Levkivskyi levkivskyi at gmail.com
Mon Nov 13 10:56:03 EST 2017


FWIW, it is common to have syntax checks in ast.c.
Especially situations like class ``C(x for x in [1]): ...`` I think would
be hard to prohibit in Grammar.
Since anyway we have many checks in ast.c already, I wouldn't care much
about implementing these corner cases in Grammar.

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171113/c43efa56/attachment.html>


More information about the Python-Dev mailing list