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

Greg Ewing see at my.signature
Thu Jul 20 23:14:49 EDT 2000


Michael Hudson wrote:
> 
> > an elementwise tuple-creation operator
> 
> You're joking, right?

About that particular syntax, yes. But not about
the idea of some sort of zipping syntax.

For one thing, it would make it easier to implement
parallel iteration efficiently. When I write

  for x,y in zip(a,b):

I'm just trying to express the way the iteration is
to be carried out. I don't really mean that I want the
zip of the two lists to be computed first and then
iterated over.

If there were a special syntax for zipping, the
compiler could easily recognise this case and
optimise it.

I haven't thought of a syntax for it that I really
like, yet, though. 

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list