[Python-ideas] Heap data type

Stefan Behnel stefan_ml at behnel.de
Tue Apr 21 07:13:02 CEST 2009

Gerald Britton wrote:
> On Mon, Apr 20, 2009 at 1:41 PM, Terry Reedy wrote:
>> Gerald Britton wrote:
>>> May I suggest that you implement an interface similar to the sort()
>>> method for list objects:
>>> =========================
>>> sort([cmp[, key[, reverse]]])
>> Cmp(), .__cmp__, cmp=xxx, etc, are gone in Py3.
> Is this only targeting 3.x?  I think it would be useful in 2.x as well.

1) I think the usual approach is to implement it for Py3, then backport it.

2) Since we already know that code that uses cmp=xyz is not Py3 compatible,
there is little use in providing this parameter for a new data type, so
that new code ends up being broken in the future.


More information about the Python-ideas mailing list