Message222270
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 |
|
Date |
User |
Action |
Args |
2014-07-04 08:08:11 | andymaier | set | recipients:
+ andymaier, rhettinger, terry.reedy, mark.dickinson, ezio.melotti, cvrebert, chris.jerdonek, docs@python, mikehoy |
2014-07-04 08:08:11 | andymaier | set | messageid: <1404461291.9.0.407027483922.issue12067@psf.upfronthosting.co.za> |
2014-07-04 08:08:11 | andymaier | link | issue12067 messages |
2014-07-04 08:08:11 | andymaier | create | |
|