Python Number Limit

Trent picture Trent · Mar 29, 2011 · Viewed 43.5k times · Source

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 ~.

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 !

Answer

CloudyMarble picture CloudyMarble · Mar 29, 2011

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.