Python数量限制 [英] Python Number Limit

查看:90
本文介绍了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数量限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆