sorting dictionary keys?
Peter Hansen
peter at engcorp.com
Sat Nov 29 20:54:31 EST 2003
Bruno Desthuilliers wrote:
>
> Serge Orlov wrote:
> >><rant>
> >>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).
> >></rant>
> >
> >
> > <hint>
> > def sort(lst):
> > lst.sort()
> > return lst
> > </hint>
>
> Which is pretty ugly and adds a useless function call.
>
> I just can't understand *why* the BDFL made this choice.
What part of the many past repetitions of the reason didn't
you understand?
-Peter
More information about the Python-list
mailing list