This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2006-08-28.13:10:09
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.



History
Date User Action Args
2007-08-23 14:42:13adminlinkissue1544762 messages
2007-08-23 14:42:13admincreate