Sorting using lambda not working in Py2.1?

mary mary.stern at virgin.net
Thu May 3 12:02:12 EDT 2001


I may be doing something wrong, or is this a bug in 2.1?

x = (9,5,4,3,1,2)

print x.sort()
-> (1,2,3,4,5,9)
print x.sort(lamda x,y: x<y)
-> (9,5,4,3,1,2) !!

I'm using the 2.1 released source, built on Redhat 6.2...

- Tushar.





More information about the Python-list mailing list