"What's New": stable sorting?
23 Jul
2004
23 Jul
'04
6:33 p.m.
Just reading through "What's New in Python 2.4" and I spotted this:
"""
The results of sorting are now guaranteed to be stable. This means that
two entries with equal keys will be returned in the same order as they
were input. For example, you can sort a list of people by name, and then
sort the list by age, resulting in a list sorted by age where people
with the same age are in name-sorted order.
"""
I thought the Tim-bot fixed Python's list.sort() to be stable *aaaages*
ago -- 1.6 or 2.0 rings a bell. Not true?
Greg
--
Greg Ward
7208
Age (days ago)
7208
Last active (days ago)
1 comments
2 participants
participants (2)
-
Greg Ward
-
Tim Peters