icmp - should this go in itertools?
twic at urchin.earth.li
Sat Nov 26 21:34:27 CET 2005
On Fri, 25 Nov 2005, Roy Smith wrote:
> Tom Anderson <twic at urchin.earth.li> wrote:
>> It's modelled after the way cmp treats lists - if a and b are lists,
>> icmp(iter(a), iter(b)) should always be the same as cmp(a, b).
>> Is this any good? Would it be any use? Should this be added to itertools?
> Whatever happens, please name it something other than icmp. When I read
> "icmp", I think "Internet Control Message Protocol".
Heh! That's a good point. The trouble is, icmp is clearly the Right Thing
to call it from the point of view of itertools, continuing the pattern of
imap, ifilter, izip etc. Wouldn't it be clear from context that this was
nothing to do with ICMP?
Gotta treat 'em mean to make 'em scream.
More information about the Python-list