[Python-Dev] Disallow ambiguous syntax f(x for x in [1],) (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Sun Nov 12 17:57:53 EST 2017
- Previous message (by thread): [Python-Dev] Disallow ambiguous syntax f(x for x in [1],)
- Next message (by thread): [Python-Dev] Disallow ambiguous syntax f(x for x in [1],)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message (by thread): [Python-Dev] Disallow ambiguous syntax f(x for x in [1],)
- Next message (by thread): [Python-Dev] Disallow ambiguous syntax f(x for x in [1],)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]