[Python-Dev] Python 2.4 | 7.3 The for statement

Andrew Koenig ark-mlist at att.net
Sun Mar 20 18:31:20 CET 2005

> for_stmt ::= "for" target_list "in" expression_list
>  [ "and" expression ] ":"
>   suite ["else" ":" suite]

It can't work.  The expression_list could be just a variable, as could the
expression, in which case you get

	"for" target_list "in" variable "and" variable ":"

and, of course

	variable "and" variable

is already an expression.  So it's ambiguous.

More information about the Python-Dev mailing list