[Python-Dev] accumulator display syntax
Guido van Rossum
guido at python.org
Tue Oct 21 16:57:03 EDT 2003
> I thought the definition for list comprehension syntax was something like
>
> '['
> <expr> for <vars> in <expr>
> [ for <vars> in <expr> ] *
> [ if <expr> ] *
> ']'
>
> The loop <vars> in an earlier for clause should be visible in all nested for
> clauses and conditional clauses, not just in the first <expr>.
Absolutely, good point!
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list