informal representation of long integers

Fredrik Lundh fredrik at effbot.org
Fri Jan 26 12:01:26 EST 2001


Randall Kern wrote:
> Using Python 1.5.2:
>
> >>> str(10L)
> '10L'
> >>> repr(10L)
> '10L'
>
> Just curious why the 'informal' representation of 10L
> is '10L', rather than '10'.

which one is the "informal" representation?

if you mean "str", python 1.6 and later does
what you want:

>>> str(10L)
'10'
>>> repr(10L)
'10L'

Cheers /F





More information about the Python-list mailing list