On 3/27/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> 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):
>      ...

I assume this would be exactly equivalent to::

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

where zip is actually izip since we're talking Python 3000?

I'm -1, at least until I see some code that's substantially improved
by the syntax.  The zip version isn't that complicated -- you just
need to understand how zip works.  And zip has a variety of other
use-cases, so any consistent user of Python should get themselves
familiar with it.

STeVe
--
Grammar am for people who can't think for myself.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
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