[issue7660] Two float('nan') are not equal

2010-01-08 Thread Mark Dickinson
Mark Dickinson added the comment: >>> float('nan') == float('nan') False >>> float('nan') != float('nan') True This is deliberate, though perhaps surprising if you haven't seen it before. There's a long history of nan comparisons behaving this way (that is, x == nan always returns False, x !

[issue7660] Two float('nan') are not equal

2010-01-08 Thread Jean-Michel Fauth
New submission from Jean-Michel Fauth : I did not find any report about this. Windows 7, Python 2.6.4 >>> float('inf') == float('inf') True >>> float('-inf') == float('-inf') True >>> float('-inf') == float('inf') False >>> float('-inf') != float('inf') True >>> float('nan') == float('nan') Fal