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/109201.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=...)Raymond Hettinger raymond.hettinger at gmail.com
Sun Mar 13 04:00:00 CET 2011
On Mar 12, 2011, at 3:44 PM, Guido van Rossum wrote:

> I was just reminded that in Python 3, list.sort() and sorted() no
> longer support the cmp (comparator) function argument. The reason is
> that the key function argument is always better. But now I have a
> nagging doubt about this:
> 
> I recently advised a Googler who was sorting a large dataset and
> running out of memory. 

. . .

> But in Python 3 this solution is no longer available. How bad is that?
> I'm not sure. But I'd like to at least get the issue out in the open.
> 


Python3.2 should be substantially better in this regard.
It no longer wraps key objects around every input.  Instead, it
sorts two parallel arrays of pointers.   You can thank Daniel
Stutzbach (another Googler I believe) for this effort.


Raymond

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