Re: How does compare work?

From: Mel Wilson (mwilson_at_the-wire.com)
Date: 01/28/04


Date: Wed, 28 Jan 2004 11:29:18 -0500

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



Relevant Pages

  • Re: How does compare work?
    ... > (This unusual definition of comparison was used to simplify the ... > definition of operations like sorting and the in and not in operators. ... sequence of mixed types becomes illegal as well? ... If any one leave his house, run away, and then his wife go to ...
    (comp.lang.python)
  • Re: How does compare work?
    ... > Inyeol Lee wrote: ... >> definition of operations like sorting and the in and not in operators. ... > sequence of mixed types becomes illegal as well? ...
    (comp.lang.python)