Christian Heimes added the comment:

Noam Raphael wrote:
> * nan is an object of type float, which behaves like None, that is:
> "nan == nan" is true, but "nan < nan" and "nan < 3" will raise an
> exception. 

No, that's not correct. The standard defines that nan is always unequal
to nan.

False
>>> float("inf") == float("inf")
True
>>> float("inf") == -1*float("-inf")
True

The float module could gain three singletons nan, inf an neginf so you
can do

True

Christian

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1580>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to