string formatting question
Aahz Maruch
aahz at panix.com
Fri Jan 5 19:35:07 EST 2001
In article <3a5660f8.626036031 at localhost>,
Victor Muslin <victor at prodigy.net> wrote:
>An integer can be formatted as follows:
>
> >>> '%d' % 123
>
>How is an infinite precision long integer formatted into a string? If
>The above code:
>
> >>> '%d' % 123123123123123123L
>
>produces an OverflowError exception. Surely there is something simple
>I am overlooking in the manual, but none of the other format
>specifiers described seemed to be appropriate.
The simplest approach is to use %s. I've never tried any of the other
format specifiers for long ints.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
"This is Usenet. We're all masturbating in public places." -DH
More information about the Python-list
mailing list