I checked the help for sys.maxsize
in Python 3.6:
>>> help(sys)
[...]
maxsize -- the largest supported length of containers.
Testing it:
In [10]: '{:,}'.format(sys.maxsize)
Out[10]: '9,223,372,036,854,775,807'
In [11]: math.log2(sys.maxsize)
Out[11]: 63.0
It's 63 bits, which suggests a leading sign bit. However, the length of a container cannot be negative.
What's going on here?