Some years ago there was a long discussion about extending
the for-loop to express parallel iteration over a number
of iterables, which ended with the conclusion that such
an extension was syntactically impossible, and the creation
of zip().

Slightly too late for consideration, I did come up with
what I believe is a backwards-compatible syntax extension
to support this:

   for (x in iter1, y in iter2):
     ...

This is currently a syntax error, so there is no clash
with existing semantics.

I'm mentioning it here again just in case anyone wants
to consider it for Py3k. I still believe it would be
nice to have a direct syntax for parallel iteration
to avoid the overhead of using zip or iterzip.

Also I think the above is easier to read, because it
puts each variable next to the relevant expression.

Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to