NaN comparisons - Call For Anecdotes
rosuav at gmail.com
Tue Jul 8 18:27:09 CEST 2014
On Wed, Jul 9, 2014 at 2:16 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Chris Angelico <rosuav at gmail.com>:
>> 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.
I'd say it would surprise people rather a lot if operations like dict
insertion/lookup could trigger arithmetic exceptions. :)
More information about the Python-list