Message279878
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. |
|
Date |
User |
Action |
Args |
2016-11-01 15:00:37 | niacdoial | set | recipients:
+ niacdoial |
2016-11-01 15:00:37 | niacdoial | set | messageid: <1478012437.7.0.981813738405.issue28579@psf.upfronthosting.co.za> |
2016-11-01 15:00:37 | niacdoial | link | issue28579 messages |
2016-11-01 15:00:37 | niacdoial | create | |
|