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 Shane Smith
Recipients Geraldo.Xexeo, Shane Smith
Date 2019-04-11.00:06:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554941171.71.0.497016305569.issue36592@roundup.psfhosted.org>
In-reply-to
Content
This is the sort of thing that makes me avoid "is" in favor of "==" for most applications.  Understanding when two objects point to the same memory requires a deeper understanding of the underlying code than I usually want to delve into.

Anyway, I find it interesting that for 3.7.3:
>>> a, b = 256, 256
>>> a is b
True

>>> a, b = 257, 257
>>> a is b
False


So 2**8 is a magic number, for whatever reason.  I'll be sticking with "=="...
History
Date User Action Args
2019-04-11 00:06:11Shane Smithsetrecipients: + Shane Smith, Geraldo.Xexeo
2019-04-11 00:06:11Shane Smithsetmessageid: <1554941171.71.0.497016305569.issue36592@roundup.psfhosted.org>
2019-04-11 00:06:11Shane Smithlinkissue36592 messages
2019-04-11 00:06:11Shane Smithcreate