我想获取int类型的最大值
In [1]: import sys
In [2]: sys.getsizeof(int)
Out[2]: 400
这是否意味着Python中的maxint是2 ** 40?
然而,当我尝试时
In [5]: types = [int, float, complex, list, tuple, dict, set, True, False, None]
In [7]: [sys.getsizeof(type) for type in types]
Out[7]: [400, 400, 400, 400, 400, 400, 400, 28, 24, 16]
所有数据类型都是400字节。
对于整数来说,400字节意味着什么?
In [13]: sys.maxsize Out[13]: 9223372036854775807
@ForceBru - AbstProcDo