I just wrote this primitive script:
from sys import getsizeof as g
x = 0
s = ''
while s != 'q':
x = (x << 8) + 0xff
print(str(x) + " [" + str(g(x)) + "]")
s = input("Enter to proceed, 'q' to quit ")
The output is as follows - and quite surprising, as I perceive it:
255 [28]
65535 [28]
16777215 [28]
4294967295 [32]
1099511627775 [32]
281474976710655 [32]
72057594037927935 [32]
18446744073709551615 [36]
And so on. My point is: it seems that the variable x has some sort of 'overhead' with a size of 25 bytes. Where does this come from? Thanks in advance for any attempt to help me.