[Python-Dev] comprehension abbreviation (was: Adding any() and
bac at OCF.Berkeley.EDU
Tue Mar 15 22:55:40 CET 2005
Eric Nieuwland wrote:
> Martin v. Löwis wrote:
>> That's not the full syntax. The full syntax is
>> [ <test> for <exprlist> in <testlist> <list-iter-opt> ]
>> <test> can be an arbitrary expression: and, or, lambda, +, -, ...
>> <exprlist> can be a list of expression, except for boolean and
>> relational expressions (but I think this is further constrained
>> <testlist> list a list of tests
>> <list-iter-opt> is optional, and can be another for or if block
> Aren't these names a bit mixed up w.r.t. what's in that position?
The names come directly from the grammar file (Grammar/Grammar) and thus have
multiple uses. Basically ignore the actual names and just consider them
More information about the Python-Dev