Python 2 has two integer datatypes int and long, and automatically converts between them as necessary, especially in order to avoid integer overflo
Use NumPy (which is written in C and exposes native machine-level integers). NumPy has these integer types:
Signed integers:
Unsigned integers:
For example (notice it overflows after integer value 127):
import numpy as np
counter = np.int8(0)
one = np.int8(1)
for i in range(130):
print(type(counter), counter)
counter = counter + one
At any point you can convert back to a Python integer with just int(counter), for example.