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 josh.r
Recipients Alexander Todorov, barry, docs@python, josh.r, steven.daprano
Date 2017-03-08.15:35:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488987323.45.0.697958840526.issue29756@psf.upfronthosting.co.za>
In-reply-to
Content
Steven: Technically, in CPython, they use both identity and equality testing, as a function of using RichCompareBool (which tests identity first, then equality), rather than RichCompare (which only tests equality).

It makes a difference for stuff like NaN values, where describing it as equality only would imply that:

nan = float('nan')
([nan] * 10).count(nan)

produces 0 (because nan is equal to nothing, including itself), when in fact it produces 10 (because we reused the same nan object, and the identity test passed).
History
Date User Action Args
2017-03-08 15:35:23josh.rsetrecipients: + josh.r, barry, steven.daprano, docs@python, Alexander Todorov
2017-03-08 15:35:23josh.rsetmessageid: <1488987323.45.0.697958840526.issue29756@psf.upfronthosting.co.za>
2017-03-08 15:35:23josh.rlinkissue29756 messages
2017-03-08 15:35:23josh.rcreate