On Tue, Mar 3, 2020 at 5:35 PM Guido van Rossum <gu...@python.org> wrote:

> But beware, IIRC there are pathological cases involving floats, (long)
> ints and rounding where transitivity may be violated in Python (though I
> believe only Tim Peters can produce an example :-). I'm honestly not sure
> that that's enough to sink the idea. (If it were, NaN would be a bigger
> problem.)
>

Floats cannot violate transitivity of inequality.  But they are also not a
total order when you include nans and infs (which are part of floats).  I'm
not as certain about unbounded ints, but I would be pretty surprised if
they could somehow violate transitivity either.

Still, including floats in TotalOrderableExceptWeirdValues is fine... and
that can alias Orderable for practical purposes.


-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/VCEZWR2Y6AJ2DTQWPQTDE5M4KXYEGN3O/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to