There is the quite famous post, which states that values from -5 to 256 in Python are singletons and that using is
as comparison operator will return True
.
When I tried this:
c = 257
d = 257
print(c is d)
True
I expected this to be False
. Currently I use Python 3.10. Did the implementation of how integers are stored change? Or did I do something wrong?