[Python-Dev] PyObject_RichCompareBool identity shortcut

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Apr 28 07:53:06 CEST 2011


On Thu, Apr 28, 2011 at 12:24 AM, Guido van Rossum <guido at python.org> wrote:
> So do new masks get created when the outcome of an elementwise
> operation is a NaN?  Because that's the only reason why one should have
> NaNs in one's data in the first place.

If this is the case, why Python almost never produces NaNs as IEEE
standard prescribes?

>>> 0.0/0.0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: float division


> -- not to indicate missing values!

Sometimes you don't have a choice.  For example when you data comes
from a database that uses NaNs for missing values.


More information about the Python-Dev mailing list