Integer Types

Integers

     a = 42
     b = -371
     c = 0xffe8ab
  • Represent values in the range of machine precision.
  • The same as the C long datatype (32 or 64 bits depending on CPU and compiler).

Long Integers

     d = 42003882399L
     e = -388298371662776362L
  • Arbitrary precision integers.
  • Size constrained only by available memory.

Note: All integers are signed

<<< O'Reilly OSCON 2000, Introduction to Python, Slide 36
July 17, 2000, beazley@cs.uchicago.edu
>>>