L
is not part of the numeric value.
Rather, in Python 2.x, it is part of a integer literal as understood by the Python parser - it results in a long
value vs an int
value, if it were not suffixed. (Python will automatically up-promote larger integer literals to long values as required, the L
is optional in this case.)
The repr of long
will also be suffixed with L
, where there is no suffix for int
values.
Use long(anInt)
to force explicit conversion from int
to long
.
Python 3 removes the "L" notation as it effectively combines long/int
(ref. integer changes).