Guido rethinking removal of cmp from sort method
Antoon Pardon
Antoon.Pardon at rece.vub.ac.be
Wed Mar 23 09:53:42 EDT 2011
On Sun, Mar 13, 2011 at 12:59:55PM +0000, Steven D'Aprano wrote:
> The removal of cmp from the sort method of lists is probably the most
> disliked change in Python 3. On the python-dev mailing list at the
> moment, Guido is considering whether or not it was a mistake.
>
> If anyone has any use-cases for sorting with a comparison function that
> either can't be written using a key function, or that perform really
> badly when done so, this would be a good time to speak up.
How about a list of tuples where you want them sorted first item in ascending
order en second item in descending order.
--
Antoon Pardon
More information about the Python-list
mailing list