Because all comparisons with NAN return false, that's the spec. is NAN > 0? False. Is NAN< 0? False. Is NAN == 0? False. Is NAN == <anything>? False. So: Is NAN == NAN? False. And one more: Is NAN < 1.0e18? False
This makes some sense because NAN is Not A Number, so any comparison to a number fails. --- Joseph S. -----Original Message----- From: ast <n...@gmail.com> Sent: Wednesday, February 13, 2019 8:21 AM To: python-list@python.org Subject: Why float('Nan') == float('Nan') is False Hello >>> float('Nan') == float('Nan') False Why ? Regards -- https://mail.python.org/mailman/listinfo/python-list