merge (Re: zip or marry etc)

Bjorn Pettersen bjorn at roguewave.com
Wed Jul 19 14:11:02 EDT 2000


Peter Schneider-Kamp wrote:
> 
> Okay, assume you call it "merge". What will somebody who
> doesn't know what it's for think it does?
> 
> merge([1, 2, 3], [4, 5, 6]) == [1, 4, 2, 5, 3, 6]
> 
> or
> 
> merge([1, 2, 3], [4, 5, 6]) == [(1, 4), (2 ,5), (3, 6)]?

Point taken.

> Where's your problem with zip?

Not a problem really, although my first association was "why would we
want to iterate over a compressed sequence..." <wink>

-- bjorn




More information about the Python-list mailing list