Python Number Limit(Python 数量限制)
问题描述
我知道在大多数情况下,如果不是所有编程语言、整数、浮点数等都有它们可以容纳的最大数量,无论是无符号的还是有符号的.比如pascal的int类型最多只能容纳32768~.
I know in most, if not all programming languages, integers, floats etc all have a maximum amount they can hold, either unsigned or signed. Eg pascal's int type can only hold up to 32768 ~.
我想知道的是,python 的 int 和浮点变量的限制是什么.我尝试了一个小程序来产生非常大的数字,但我没有遇到任何错误.它甚至对这些变量的大小有限制吗?
What i wanted to know was, what is the limit on python's int and floating point variables. I tried a little program to produce extremely large numbers, but i ran into no errors. Does it even have limits on how big these variables can be ?
我查看了文档,但找不到我要查找的内容:/
I looked in the documentation and couldn't find what i was looking for :/
非常感谢您的帮助,谢谢!
Help would be greatly appreciated, thanks !
推荐答案
早期版本对 int
有限制,现在去掉了,可以说没有限制,取决于内存您的计算机.查看这篇文章.
Earlier Versions had a limit on int
but its removed now, so you can say there is no limit, it depends on the memory of your computer. Check this article.
这篇关于Python 数量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Python 数量限制


基础教程推荐
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01