What does it mean by "stability in sorting"? Can somebody please give a sample for using the code posted? I am a little lost here and I like to know more about the use of keys....
Thanks, "Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Jeff Shannon wrote: > > I suppose that your version has the virtue that, if the sortkey value is > > equal, items retain the order that they were in the original list, > > whereas my version will sort them into an essentially arbitrary order. > > Is there anything else that I'm missing here? > > Stability in sorting is a property not to be sneezed at - it means switching to > sorting by a second key gives the effect of "sort by key 1, then by key 2", > whereas that doesn't hold with an unstable sort algorithm. If you've ever used > an application with an unstable sorting process and that only allows sorting a > table on one column at a time, you'll appreciate the frustration that can cause :) > > Also, it's required to match the behaviour of the Python 2.4 version (which gets > to take advantage of the stability of the builtin sort). > > Cheers, > Nick. > > -- > Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia > --------------------------------------------------------------- > http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list