[Python-ideas] Heap data type
Gerald Britton
gerald.britton at gmail.com
Mon Apr 20 21:16:58 CEST 2009
Is this only targeting 3.x? I think it would be useful in 2.x as well.
On Mon, Apr 20, 2009 at 1:41 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> Gerald Britton wrote:
>>
>> Raymond, Facundo,
>>
>> May I suggest that you implement an interface similar to the sort()
>> method for list objects:
>> =========================
>> sort([cmp[, key[, reverse]]])
>>
>> "cmp specifies a custom comparison function of two arguments (list
>> items) which should return a negative, zero or positive number
>> depending on whether the first argument is considered smaller than,
>> equal to, or larger than the second argument: cmp=lambda x,y:
>> cmp(x.lower(), y.lower()). The default value is None.
>
> Cmp(), .__cmp__, cmp=xxx, etc, are gone in Py3.
>
> +something for the other two.
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>
--
Gerald Britton
More information about the Python-ideas
mailing list