From doing a google search, the range of numbers where integer interning occurs in python3 is -5 to 256 but when I tried to use numbers outside of that range it still seems that integer interning is still occurring. For example:
x = 258
y = 258
print("Address of x: ", id(x))
print("Address of y: ", id(y))
print(x is y)
results in:
Address of x: 2380522692112
Address of y: 2380522692112
True
I get a similar result if I change x and y to 20000
I was expecting the address of x and y to be different and to get "False" on the third line, similar to the results that someone from the following older post got: Memory optimization / Interning in python
Has the limit for integer interning changed? If yes, does anyone know what the new range is? I'm using python version 3.11.1 by the way.
-Thanks in Advance