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 Dan Rose
Recipients Dan Rose
Date 2018-07-11.19:08:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za>
In-reply-to
Content
In the Python 3.7.0 interpreter, the following evaluates to False. In 3.6.4, it was True:

    c,d = 500,500
    c is d

This seems to be because, in some cases, Python 3.7 fails to intern integers inside tuples:

    a = (500,500)
    print(a[0] is a[1]) # False
    
    a = (500,500,42)
    print(a[0] is a[1]) # False
    
    a = (500,500,'42')
    print(a[0] is a[1]) # False
    
    answer = 42
    a = (500,500,answer)
    print(a[0] is a[1]) # True
    
    a = (500,500,[42])
    print(a[0] is a[1]) # True

    a = [500,500]
    print(a[0] is a[1]) # True

I believe the above should all return True.
History
Date User Action Args
2018-07-11 19:08:31Dan Rosesetrecipients: + Dan Rose
2018-07-11 19:08:31Dan Rosesetmessageid: <1531336111.06.0.56676864532.issue34100@psf.upfronthosting.co.za>
2018-07-11 19:08:31Dan Roselinkissue34100 messages
2018-07-11 19:08:31Dan Rosecreate