[Python-Dev] Python3 regret about deleting list.sort(cmp=...)
Nick Coghlan
ncoghlan at gmail.com
Sat Mar 12 22:58:44 CET 2011
More information about the Python-Dev mailing list
Sat Mar 12 22:58:44 CET 2011
- Previous message: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)
- Next message: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)
- Next message: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list