Best python module for Oracle, but portable to other RDBMSes

skip at skip at
Thu Mar 2 23:19:39 CET 2006

    dananrg> Are you saying I'm getting the "L" as an artifact of printing?

No, you're getting the "L" because you're printing a long integer.  If you

    x = 872L
    y = 872

at a Python prompt, x will be a long integer and y will be an integer.  Long
integers can represent arbitrarily large numbers (subject only to memory
limitations).  Integers are signed objects that are generally the same size
as the C long int type.  They are currently two more-or-less distinct types.
As time goes on they are converging though.  By the time Python 3.0 is
released I suspect there will be no difference.

If passing a long integer to some other routine is a problem (because it can
only accept regular integers) you can always convert it explicitly:

    z = int(x)


More information about the Python-list mailing list