New submission from Liam Marsh: I found a really weird comportment with NANs:
>>> from math import nan, isnan, inf >>> nan==nan False >>> nan!=nan True >>> a=nan # maybe get another instance would fix it (or so I thought) >>> a==nan False >>> a==a False >>> a is a True >>> # because `is` works, it could be a >>> # deliberate comportment. is it? >>> a is nan True >>> isnan(a) and isnan(nan) True >>> nan == -nan False >>> nan is -nan False >>> a < 1 False >>> a > 0 False >>> a < inf False >>> b=external_pyd_call_that_returns_nan() >>> isnan(b) True >>> b == nan False that sums what I tried up. thanks for reading this. ---------- messages: 279878 nosy: niacdoial priority: normal severity: normal status: open title: nan != nan type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28579> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com