akira added the comment:
It is about equality. `float('nan') != float('nan')` unlike `0 == 0`.
>From msg221603:
> If not equal, the sequences are ordered the same as their first differing
> elements.
The result of the expression: `(a, whatever) < (b, whatever)` is defined by
`a < b` if a and b differs i.e., it is not necessary to compare other elements
(though Python language reference doesn't forbid further comparisons. It
doesn't specify explicitly the short-circuit behavior for sequence comparisons
unlike for `and`, `or` operators that guarantee the lazy (only as much as
necessary) evaluation).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue21873>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com