How does compare work?
exarkun at intarweb.us
Tue Jan 27 15:08:36 CET 2004
On Tue, Jan 27, 2004 at 02:16:51PM +0100, Gerrit Holl wrote:
> Inyeol Lee wrote:
> > (This unusual definition of comparison was used to simplify the
> > definition of operations like sorting and the in and not in operators.
> > In the future, the comparison rules for objects of
> > different types are likely to change.)
> > """
> When comparing mixed types becomes illegal, does that mean sorting a
> sequence of mixed types becomes illegal as well? Or will sort be a
> special case?
There was discussion of another operation, "before", which could be used
to order different types, but which would not be used by < or >.
I forget if the final word on this idea was positive or negative, but I'm
sure anyone interested could dig up the relevant thread on python-dev.
More information about the Python-list