merge (Re: zip or marry etc)

Dan Schmidt dfan at harmonixmusic.com
Thu Jul 20 11:53:49 EDT 2000


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

| In article <8l6vc5$c07$1 at slb6.atl.mindspring.net>, Aahz Maruch
| <aahz at netcom.com> writes
| ...
| >>The function zip as proposed (combine two lists into a list of pairs)
| >>is straight from Haskell (and other functional languages) just like map
| >>and filter. I think zip is the obvious name.
| >
| >Ah.  Hmmmm....  Well, then, I guess I withdraw my objections to zip.
| >I'd still prefer something else, but....
| ...
| so are we saying that the almost unknown language Haskell has the
| correct semantics for this; zip has at least three common usages other
| than of zip fastener meaning (interlace).

The thing is, if we're using map, filter, and reduce, which all come
from the lexicon of functional languages, we might as well use their
term for this particular operation as well, which is zip.  It's not
just a question of Haskell, and not just a question of zip.

zip is fine with me, but if we were to choose a brand-new name, I like
the make_pairs that someone proposed, or, since I guess it can work on
more than two lists, make_tuples.  Or how about tuple_up? :)

-- 
                 Dan Schmidt | http://www.dfan.org
Honest Bob CD now available! | http://www.dfan.org/honestbob/cd.html



More information about the Python-list mailing list