This smells like a bug in the != operator, it seems to fall back to not == which it didn't used to. More later.....
On Mon, Oct 08, 2012 at 09:29:42AM -0700, Guido van Rossum wrote:
> It's not about equality. If you ask whether two NaNs are *unequal* the
> answer is *also* False.
Not so. I think you are conflating NAN equality/inequality with ordering
comparisons. Using Python 3.3:
py> nan = float('nan')
py> nan > 0
False
py> nan < 0
False
py> nan == 0
False
py> nan != 0
True
but:
py> nan == nan
False
py> nan != nan
True
--
Steven
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas