How does compare work?

Mel Wilson mwilson at the-wire.com
Wed Jan 28 17:29:18 CET 2004


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

        Regards.        Mel.



More information about the Python-list mailing list