On 2017-09-22 14:43, Steve D'Aprano wrote: > In the case of floating point NANs, they are unordered with respect to all > numbers. So for any number x, we always have: > > NAN == x > NAN < x > NAN > x > NAN <= x > NAN >= x > > all return False, and > > NAN != x > > return True.
Just to make the implication explicit: >>> from math import nan >>> nan is nan True >>> nan == nan False >>> nan != nan True >>> -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list