[Python-bugs-list] list.sort() with sort function (PR#131)

mhammond@skippinet.com.au mhammond@skippinet.com.au
Thu, 18 Nov 1999 01:59:33 -0500 (EST)


Hi Sam,

This isnt a bug - sort should have a 3 outcome "cmp" style function.

Check out http://x25.deja.com/viewthread.xp?AN=541957314 for a recent
thread on the subject, and particularly the referenced message by Tim
Peters, which goes into excruciating detail about the
implementation...

Mark.

> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> rushing@eGroups.net
> Sent: Thursday, 18 November 1999 5:08
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] list.sort() with sort function (PR#131)
>
>
> Full_Name: Sam Rushing
> Version: 1.5.2
> OS: linux, bsd
> Submission from: s0-106-a-gte.br5.blv.nwnexus.net (206.63.253.91)
>
>
> list.sort() with a sort function appears broken.
>
> >>> l = [23, 342, 17]
> >>> l
> [23, 342, 17]
> >>> l.sort (lambda a,b: a > b)
> >>> l
> [23, 342, 17]
> >>>