Message29618
Logged In: YES
user_id=80475
IMO, this should not be changed. Through-out Python (not
just for lists and tuples), internal routines assume that
identity implies equality. All your example shows is that
the oddball NaN is in-fact odd. IMO, the result weird, but
correct. The x!=y result is correct because that is a
property of NaNs and the [x]==[y] result is correct because
the two lists have identical content. You would get the
expected result when the content is not identical:
>>> inf=1e9999
>>> x = inf/inf
>>> y = inf/inf
>>> x != y
True
>>> [x] == [y]
I do not want the rest of Python mucked-up just because NaNs
are designed to not follow the most basic definitions of
equality (i.e. a relation is an equality relative if and
only if it is reflexsive, symmetric, and transitive).
Closing as not-a-bug.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:42:13 | admin | link | issue1544762 messages |
2007-08-23 14:42:13 | admin | create | |
|