Help with multiple key sort

ian.brady1 at gmail.com ian.brady1 at gmail.com
Tue Feb 6 13:31:10 EST 2007


gurus:

I want to implement a sql-like sort-by on multiple keys.  I've seen
many examples of just two keys.

I have a list like this

1 one 2
1 one 1
1 two 1
1 one 0
1 xx   0

result should be like this

1 four 2
1 one 0
1 one 1
1 one 2
1 xx   0

It moves right while keeping sorted order to the left.  This is the
new stable sort in 2.5.

I'm not sure what I'm doing wrong.  please help.

Thanks




More information about the Python-list mailing list