Sorting using lambda not working in Py2.1?

Marcin 'Qrczak' Kowalczyk qrczak at
Fri May 4 06:47:13 CEST 2001

Thu, 3 May 2001 18:57:51 +0200, Alex Martelli <aleaxit at> pisze:

> This violates the semantic constraints on sort's optional argument:
> it must be a function that only returns 0 when arguments are to
> be considered EQUAL for sorting purposes.  This will also return
> 0 when x>y -- not just when they're equal.

Note that using different types for
    ordering (less, equal or greater)
no matter if statically checked or not, would help to detect the error.

 __("<  Marcin Kowalczyk * qrczak at
  ^^                      SYGNATURA ZASTĘPCZA

More information about the Python-list mailing list