[Python-3000] Parallel iteration syntax
Giovanni Bajo
rasky at develer.com
Thu Mar 30 10:01:41 CEST 2006
Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>> for i,(x,y) in enumerate(izip(iter1, iter2)):
>> ...
>>
>> must be translated to:
>>
>> for (i,x in enumerate(iter1), y in iter2):
>
> Maybe the functionality of enumerate() could be
> incorporated into the syntax as well.
>
> for (i in *, x in iter1, y in iter2):
> ...
And what about the ambiguity in parsing:
for (x in iter1,y,z in iter2):
...
Giovanni Bajo
More information about the Python-3000
mailing list