Python 1.5.2 list sorting bug

Dave Cole djc at itga.com.au
Thu Oct 28 20:35:52 EDT 1999


>>>>> "Tim" == Tim Evans <tre17 at student.canterbury.ac.nz> writes:

Tim> that's an unnecessary lamdba there.

Tim> a.sort(lambda x,y: cmp(x,y))

Tim> is the same as:

Tim> a.sort(cmp)

Tim> but, then that's the same as:

Tim> a.sort()

I agree, I was trying to show that the sort with lambda comparison
function did work.  The original article said that it didn't word.

- Dave





More information about the Python-list mailing list