标签: python-3.x comparison
正如您在此代码段中看到的那样:
>>> from math import nan >>> a = nan >>> a == nan False >>> a is nan True >>> a = None >>> a == None True >>> a is None True
比较nan和比较None是另一项业务。那是为什么?
nan
None