Mat*_*hen 126
Python具有任意精度整数,因此没有真正的固定最大值.你只受可用内存的限制.
在Python 2中,有两种类型,int和long. ints使用C类型,而longs是任意精度.您可以使用sys.maxint查找最大值int.但是ints会自动升级到long,所以你通常不需要担心它:
sys.maxint + 1
Run Code Online (Sandbox Code Playgroud)
工作正常,返回一个long.
sys.maxint甚至不存在于Python 3中,因为int它long被统一为单个任意精度int类型.
| 归档时间: |
|
| 查看次数: |
64811 次 |
| 最近记录: |