sorting dictionary keys?
vze4rx4y at verizon.net
Sun Nov 30 07:30:40 CET 2003
> > sort() sorts in place and returns None
> Which is one of the main PITA in Python IMHO :(
> (not the fact that it sort in place, the fact that it does not return self).
Py2.4 will have a classmethod called list.sorted() that accepts any
iterable as an argument and returns a new sorted list as a result.
It can be used anywhere you can use an expression (function call
arguments, lambdas, list comps, etc).
More information about the Python-list