Overflow error when printing long values

Michael Teo michaelteo at bigfoot.com
Thu Aug 30 11:17:05 EDT 2001


I get an "OverflowError: long int too long to convert" when I tried to 
print "%d" % l
where l is a long Python value.

I have tried using str(l) but that gives a trailing 'L'.

Any good suggestion on how to solve this problem will be greatly
appreciated. Thanks.


-- 
Michael Teo <mailto:michaelteo at bigfoot.com>
http://miketeo.net/
PGP  0x6C846A9C  DB:7D:51:D4:4D:AB:97:79:E4:68:D9:07:94:36:D5:1A:6C:84:6A:9C
     0x6937FB05  08:50:A1:4D:2E:45:58:60:DE:71:1F:30:63:54:EF:7B




More information about the Python-list mailing list