Long overflow problem
Gerhard Häring
gerhard.haering at opus-gmbh.net
Wed Nov 6 15:12:34 EST 2002
In article <bondpaper-55CDDD.13105906112002 at nnrp02.earthlink.net>, Tom wrote:
>
> Hello,
>
> I have a function that I'm using, but I need to pass it some values that
> could range between int and longint values. It looks something like this:
>
> def myFunc (i, j):
> do cool stuff...
>
>
> If I call the function as such: myFunc(2382373743L, 2382772391L), I get
> the following error:
>
> OverflowError: Long int too long to convert to int.
You're trying to convert a long into an int using the int builtin.
> I can't seem to get myFunc to understand that i and j are long integers. How
> would I go about doing this?
Don't try to convert it to an int ;-)
For more detailed advice, we need more detailed information. In particular, a
traceback and the relevant code section where the exception occured.
--
Gerhard Häring
OPUS GmbH München
Tel.: +49 89 - 889 49 7 - 32
http://www.opus-gmbh.net/
More information about the Python-list
mailing list