[Python-Dev] PEP 201 - Parallel iteration
esr@thyrsus.com
esr@thyrsus.com
Tue, 18 Jul 2000 00:06:44 -0400
Ken Manheimer <klm@digicool.com>:
> > ([1, 2, 3], ['a', 'b', 'c']).braid() == ((1, 'a'), (2, 'b'), (3, 'c'))
> > [[1, 2, 3], ['a', 'b', 'c']].braid() == [(1, 'a'), (2, 'b'), (3, 'c')]
> >
> > and
> >
> > [[1,2,3], ['a']].braid(None) == [(1, 'a'), (2, None), (3, None)]
This is rather cool -- I especially like the implied feature of deriving the
type of the result from the type of the outermost level of the object. I
would be +1 on making zip/braid a sequence method rather than a function.
--
<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>
I don't like the idea that the police department seems bent on keeping
a pool of unarmed victims available for the predations of the criminal
class.
-- David Mohler, 1989, on being denied a carry permit in NYC