Why do integers in database row tuple have an ‘L’ suffix?

Because in versions of Python before Python 3, long integer literals were indicated with an l or L suffix. In Python 3, ints and longs have been merged into just int, which functions pretty much like long used to.

Do note that, technically, Python( 2)’s int was equivalent to C’s long, while Python’s long was more like a BigNumber-type thing with unlimited precision (which is now the case for Python 3’s int type.)

http://docs.python.org/library/stdtypes.html#numeric-types-int-float-long-complex

L is for the long data type.

For example,

age = 24 # int
bankBalance = 20000005L # long

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)