我知道在大多数情况下,如果不是所有编程语言、整数、浮点数等都有它们可以容纳的最大数量,无论是无符号的还是有符号的.比如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 数量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!