In Python, is there a way to get the largest integer one can use? Is there some pre-defined constant like INT_MAX?
本文共 2301 字,大约阅读时间需要 7 分钟。
43 7 | In Python, is there a way to get the largest integer one can use? Is there some pre-defined constant like INT_MAX? | |||
|
86 accepted | Python has arbitrary precision integers so there is no true fixed maximum. You're only limited by available memory. In Python 2, there are two types, sys.maxint + 1 works fine and returns a
| |||
转载地址:http://aihbi.baihongyu.com/
sys.maxsize
can be used when you need an arbitrarily-large value. – Jan 23 '12 at 19:07arbitrary
常用词汇precision
常用词汇