
Dec. 29, 2019
4:31 a.m.
On Sat, Dec 28, 2019 at 11:58:35PM -0800, Andrew Barnert via Python-ideas wrote:
No it won’t, unless you assume here that no possible non-numeric types could ever have non-self-equal values. Which isn’t true.
Reflexivity of equality (namely, that any value should be equal to itself) is such a fundamental property that I would assume that NANs are the only exception, until such time as somebody points out an uncontrived real-world example. A bigger concern is the question of what should isnan do for non-numeric types? isnan(None) # raise or return False? Clearly None is not a NAN, so it shouldn't return True. Should it return False because its not a NAN, or raise because it's not a numeric type at all? -- Steven