NaN comparisons - Call For Anecdotes

Marko Rauhamaa marko at
Tue Jul 8 18:16:53 CEST 2014

Chris Angelico <rosuav at>:

> Why *should* all NaNs be equal to each other?

I appreciate why you can't say NaN is equal to NaN. However, shouldn't
the very comparison attempt trigger an arithmetic exception? After all,
so does a division by zero.


More information about the Python-list mailing list