zip or marry etc

Olivier Dagenais olivierS.dagenaisP at canadaA.comM
Wed Jul 19 10:20:09 EDT 2000


How about:

"twist", "merge", "smash", "glue", "dna", "ladder", "join", "match",
"collect", "pick", "lineup"???

Just some names....

--
----------------------------------------------------------------------
Olivier A. Dagenais - Carleton University - Computer Science III


"Michael Hudson" <mwh21 at cam.ac.uk> wrote in message
news:m3og3uprzw.fsf at atrus.jesus.cam.ac.uk...
> Robin Becker <robin at jessikat.fsnet.co.uk> writes:
>
> > I suppose there must be something desperately wrong with using the
> > __mul__ for sequences to indicate the set pairwise product. I would
> > certainly be for
> >
> > x,y in A*B rather than x,y in zip(A,B) or marry(A,B), but since * is the
> > obvious operator it must be that someone else has reserved it.
>
> Well, whatever "zip" ends up being called, it doesn't return the
> Cartesian product of the set of elements of the list, so using the
> product operator would be, at best, confusing!
>
> Wouldn't you expect
>
> >>> for i,j in [0,1]*[2,3]:
> ...     print i,j
> (0,2)
> (0,3)
> (1,2)
> (1,3)
>
> rather than
>
> >>> for i,j in zip([0,1],[2,3]):
> ...     print i,j
> (0,2)
> (1,3)
>
> ?
>
> Cheers,
> M.
>
> --
>   I also fondly recall Paris because that's where I learned to
>   debug Zetalisp while drunk.                          -- Olin Shivers





More information about the Python-list mailing list