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 serhiy.storchaka
Recipients Dan Rose, mark.dickinson, methane, serhiy.storchaka, vstinner
Date 2018-07-12.04:52:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531371136.95.0.56676864532.issue34100@psf.upfronthosting.co.za>
In-reply-to
Content
This is not only with integers.

>>> a = ((1, 2), (1, 2))
>>> a[0] is a[1]
False
>>> a = ('@#$', '@#$')
>>> a[0] is a[1]
False
>>> a = (1.0, 1.0)
>>> a[0] is a[1]
False

The only exception is short ASCII identifier-like strings (as a side effect of interning them):

>>> a = ('foo', 'foo')
>>> a[0] is a[1]
True

I'm not sure this is a problem which should be resolved.
History
Date User Action Args
2018-07-12 04:52:17serhiy.storchakasetrecipients: + serhiy.storchaka, mark.dickinson, vstinner, methane, Dan Rose
2018-07-12 04:52:16serhiy.storchakasetmessageid: <1531371136.95.0.56676864532.issue34100@psf.upfronthosting.co.za>
2018-07-12 04:52:16serhiy.storchakalinkissue34100 messages
2018-07-12 04:52:16serhiy.storchakacreate