Dot-comma, anyone? (Re: zip or marry etc)

Matthias matthias_w at my-deja.com
Thu Jul 20 03:14:22 EDT 2000


> >
> > We're looking just to pair up elements.
>
> In that case, obviously the solution is to combine this
> thread with the one on new operator symbols, and define
> an elementwise tuple-creation operator
>
>    .,
>
> as in
>
>   [1,2,3] ., [4,5,6] == [(1,4), (2,5), (3,6)]
...
>   for x,y,z in a.,b.,c:
>    ....

Hy
I like that one, but since bitwise operations do not make sense on
range operators (,do they?), why not use "&" since it is often used as
alternative for "and" or "+" ??:

 for x,y,z in a&b&c:
   ...

An other question:
Who should list/tuples be handled things like this:
 for x,y in  [1,2,3] & [1,2,3,4]:
   ...

:-)
Matthias


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list