Message339905
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 "=="... |
|
Date |
User |
Action |
Args |
2019-04-11 00:06:11 | Shane Smith | set | recipients:
+ Shane Smith, Geraldo.Xexeo |
2019-04-11 00:06:11 | Shane Smith | set | messageid: <1554941171.71.0.497016305569.issue36592@roundup.psfhosted.org> |
2019-04-11 00:06:11 | Shane Smith | link | issue36592 messages |
2019-04-11 00:06:11 | Shane Smith | create | |
|