Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> type(10)
<type 'int'>
>>> type(10 ** 100)
<type 'long'>> Unadorned integer literals (including binary, hex, and octal numbers) yield plain integers unless the value they denote is too large to be represented as a plain integer, in which case they yield a long integer.
>>> z=2**62
>>> type(z)
<type 'int'>
>>> type(z+z)
<type 'long'>It would take some prodding around to find out.
In the past some have implemented tagged integers for Python, good benchmarking results but the devs argue 'Good Python code should be more symbolic; it shouldn't be doing too much integer math' which also comes up where the interpreter doesn't implement specialized code for floats, instead they argue that if you need fast floating point you should be using numpy or a C extension
Tagged ints: https://mail.python.org/pipermail/python-dev/2004-July/04613...
https://wiki.haskell.org/Learn_Haskell_in_10_minutes#Simple_...
This was news to me, and when I looked it up I found out why: that's only the case in Python 3. Python 2 has a type called int that's implemented as a C long and a type called long that's a bignum [0]; Python 3 just has the latter and it's called int [1].
[0] https://docs.python.org/2/library/stdtypes.html#numeric-type...
[1] https://docs.python.org/3/library/stdtypes.html#numeric-type...