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

Greg Ewing see at my.signature
Mon Jul 24 01:14:41 EDT 2000


Paul Prescod wrote:
> 
> Plus, why add syntax when a function will do?

Because of the extra step of mental gymnastics required
to recognise that a zip followed by iteration and
unpacking into a tuple is equivalent to parallel
iteration. I want to be able to write a loop that
*looks* like parallel iteration right from the outset.

I must say I rather like the suggestion of calling
it tuples(). Maybe make it even a bit more explicit,
such as

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

I'd still rather have a direct parallel iteration
syntax, but I could live with something like that.

-- 
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