Message12179

Author stefan.richthofer
Recipients k870611, stefan.richthofer
Date 2018-11-10.21:00:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541883632.26.0.788709270274.issue2716@psf.upfronthosting.co.za>
In-reply-to
Content
Python's "is" corresponds to Java's == and Python's == corresponds to Java's equals. So you see that the same string literal created twice should not be the same object. CPython applies some memory optimization here called string interning. Jython uses interning as well, but currently not on literals. AFAIK it uses it on dictionary keys only.
History
Date User Action Args
2018-11-10 21:00:32stefan.richthofersetmessageid: <1541883632.26.0.788709270274.issue2716@psf.upfronthosting.co.za>
2018-11-10 21:00:32stefan.richthofersetrecipients: + stefan.richthofer, k870611
2018-11-10 21:00:32stefan.richthoferlinkissue2716 messages
2018-11-10 21:00:32stefan.richthofercreate