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 akira
Recipients Electro, akira, mark.dickinson
Date 2014-06-26.14:42:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403793724.85.0.216847046716.issue21873@psf.upfronthosting.co.za>
In-reply-to
Content
Is the issue that:

  >>> (1, float('nan')) == (1, float('nan'))
  False

but

  >>> nan = float('nan')
  >>> (1, nan) == (1, nan)
  True

?

`nan != nan` therefore it might be expected that `(a, nan) != (a, nan)` [1]:

> The values float('NaN') and Decimal('NaN') are special. The are identical to themselves, x is x but are not equal to themselves, x != x. 

> Tuples and lists are compared lexicographically using comparison of corresponding elements. This means that to compare equal, each element must compare equal and the two sequences must be of the same type and have the same length.
> If not equal, the sequences are ordered the same as their first differing elements.

[1]: https://docs.python.org/3.4/reference/expressions.html#comparisons
History
Date User Action Args
2014-06-26 14:42:04akirasetrecipients: + akira, mark.dickinson, Electro
2014-06-26 14:42:04akirasetmessageid: <1403793724.85.0.216847046716.issue21873@psf.upfronthosting.co.za>
2014-06-26 14:42:04akiralinkissue21873 messages
2014-06-26 14:42:04akiracreate