How does compare work?

Mel Wilson mwilson at
Wed Jan 28 17:29:18 CET 2004

In article <mailman.850.1075209472.12720.python-list at>,
Gerrit Holl <gerrit at> 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?

   Presumably there'd be a whole new set of comparisons that
would support inter-type < (e.g. for sorts) and == (e.g. for
dicts).  Even then, what about PEP 326, which presumes to
define highest and lowest objects that can be compared with

        Regards.        Mel.

More information about the Python-list mailing list