尝试了以下几种方法,都没有成功:
>>> a = float('NaN')
- >>> a == 'NaN'
False - >>> a == nan
False - >>> a == float('NaN')
False - >>> isNaN(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'isNaN' is not defined
最后找到一种感觉是非标准的方法,但是可行:
>>> a != aTrue
http://blog.csdn.net/sunlisten/article/details/7437727