[Python-Dev] total ordering.

Delaney, Timothy (Tim) tdelaney at avaya.com
Fri May 12 00:39:59 CEST 2006


Edward Loper wrote:

> It might be useful in some cases to have a keyword argument to
> sort/sorted that says to ignore exceptions arising from comparing
> elements, and leaves the ordering of non-comparable values undefined.

Why? Far better to use a key (or cmp if you really want) that imposes a
total (or at least consistent) ordering. Otherwise sorting is random.

Tim Delaney


More information about the Python-Dev mailing list