A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-March/109163.html below:

[Python-Dev] Python3 regret about deleting list.sort(cmp=...)

[Python-Dev] Python3 regret about deleting list.sort(cmp=...) [Python-Dev] Python3 regret about deleting list.sort(cmp=...)Nick Coghlan ncoghlan at gmail.com
Sat Mar 12 22:58:44 CET 2011
On Sat, Mar 12, 2011 at 4:50 PM, Reid Kleckner <reid.kleckner at gmail.com> wrote:
> They should be able to use a slotted cmp_to_key style class:
> http://docs.python.org/howto/sorting.html
>
> That will allocate 1 Python object with no dict per key, but that
> might not be good enough.

Tuples are already slotted, so that isn't likely to help in this case.

The basic point is that cmp vs key is actually a classic space vs
speed trade-off, and by removing the "cmp" option, we prevent people
from making that trade-off for themselves.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4