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

Serhiy Storchaka storchaka at gmail.com
Sun Nov 12 17:57:53 EST 2017


12.11.17 18:57, Guido van Rossum пише:
> Sounds good to me.

Thanks! Here is an implementation: https://bugs.python.org/issue32012.

I have found that formally trailing comma after generator expression is 
not allowed by the grammar defined in the language reference:

    call: `primary` "(" [`argument_list` [","] | `comprehension`] ")"

But the actual Grammar file contains different rules.



More information about the Python-Dev mailing list