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 sgala
Recipients
Date 2006-08-24.11:26:51
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=178886

This is a consequence of the way list equality is
implemented. Counterexample:

>>> inf=1e9999
>>> x=inf/inf
>>> y=inf/inf
>>> x!=y and [x] == [y]
False

i.e. [x] == [y] iff x is y

strings are interned in python (so 'a' is chr(97) returns
True), and ints (so 1+1 is 1+1 returns True) but not floats
(so inf/inf is inf/inf returns False). 

Interning floats (or at least "special" numbers, such as nan
or inf) could make sense, but I guess this is a RFE, and not
a bug, and a different one.
History
Date User Action Args
2007-08-23 14:42:13adminlinkissue1544762 messages
2007-08-23 14:42:13admincreate