[Python-Dev] [RELEASED] Python 2.7.5
Richard Oudkerk
shibturn at gmail.com
Mon May 20 02:04:31 CEST 2013
On 20/05/2013 12:47am, Pierre Rouleau wrote:
> Moreover, the development version is 3.4, and in Python 3 the int
> type is a variable-length integer type (sys.maxint doesn't exist
> anymore). So this discussion is largely moot now.
>
>
> Good to know. Too bad there still are libraries not supporting Python
> 3. Thanks.
Even in Python 2, if the result of arithmetic on ints which would
overflow, the result automatically gets promoted to a long integer which
is variable-length.
>>> 2**128
340282366920938463463374607431768211456L
>>> type(2), type(2**128)
(<type 'int'>, <type 'long'>)
So the size of an int is pretty much irrelevant.
--
Richard
More information about the Python-Dev
mailing list