Author andymaier
Recipients andymaier, chris.jerdonek, cvrebert, docs@python, ezio.melotti, mark.dickinson, mikehoy, rhettinger, terry.reedy
Date 2014-07-04.08:08:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404461291.9.0.407027483922.issue12067@psf.upfronthosting.co.za>
In-reply-to
Content
Terry,
I'd like to comment on your statement:
> 3. By default, == and /= compare identities.
in msg148774.

What experiment lead you to that conclusion?

Here is one that contradicts it (using cpython 3.4.1):

>>> i1 = 42
>>> f1 = 42.0
>>> i1 == f1
True
>>> i1 is f1
False

Is it possible, that your experiment got influenced by the optimization that attempts to reuse existing objects of immutable types?
Like in this:

>>> i1 = 42
>>> i2 = 40 + 2
>>> i1 == i2
True
>>> i1 is i2
True

Andy
History
Date User Action Args
2014-07-04 08:08:11andymaiersetrecipients: + andymaier, rhettinger, terry.reedy, mark.dickinson, ezio.melotti, cvrebert, chris.jerdonek, docs@python, mikehoy
2014-07-04 08:08:11andymaiersetmessageid: <1404461291.9.0.407027483922.issue12067@psf.upfronthosting.co.za>
2014-07-04 08:08:11andymaierlinkissue12067 messages
2014-07-04 08:08:11andymaiercreate