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 christian.heimes
Recipients christian.heimes, mark.dickinson, mikecurtis
Date 2008-11-11.01:49:49
SpamBayes Score 0.0036411034
Marked as misclassified No
Message-id <1226368191.63.0.843361017447.issue4296@psf.upfronthosting.co.za>
In-reply-to
Content
Interesting, Python 3.0 behaves differently than Python 2.x. Nice catch! :)

Python 3.0rc2 (r30rc2:67177, Nov 10 2008, 12:12:09)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> nan = float("nan")
>>> nan is nan
True
>>> nan == nan
False
>>> lst = [nan]
>>> lst is lst
True
>>> lst == lst
False

Python 2.6 (r26:66714, Oct  2 2008, 16:17:49)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> nan = float("nan")
>>> lst = [nan]
>>> lst == lst
True
>>> lst is lst
True
History
Date User Action Args
2008-11-11 01:49:51christian.heimessetrecipients: + christian.heimes, mark.dickinson, mikecurtis
2008-11-11 01:49:51christian.heimessetmessageid: <1226368191.63.0.843361017447.issue4296@psf.upfronthosting.co.za>
2008-11-11 01:49:50christian.heimeslinkissue4296 messages
2008-11-11 01:49:49christian.heimescreate