Python 3.0, rich comparisons and sorting order
steven.bethard at gmail.com
Tue Sep 21 22:43:44 CEST 2004
Andrew Dalke <adalke <at> mindspring.com> writes:
> > Yeah, by restricting comparisons, we'd be basically saying that sort
> > is only defined for lists that take the form list<some_type>.
> or where a compare function can be passed to .sort(), or
> where (in 2.4) a keys function can be passed to get the
> objects used for the comparison. Why is this a problem?
It's not, for me at least -- I'm all for restricting sort in this way. I'm
just trying to understand what problems other people are trying to solve that
they think they'd need other behavior from sort, and in what ways they can
work around the proposed limitations.
More information about the Python-list