long int OverflowException
Peyman Askari
peter_peyman_puk at yahoo.ca
Wed Apr 28 13:52:42 EDT 2010
I am seriously stumped by this one problem
I essentially have two functions like so
def a():
try:
b()
except:
print sys.exc_info()[0]
print sys.exc_info()[1]
print sys.exc_info()[2]
def b():
print x.__class__.__name__
return x
the print statement in b() says it is an int, but the exception raised in a() claims the long int causes an overflow when trying to cast it to int (I am running Python 2.5)
I can't provide the full code as it is part of a larger code, and I can't decouple it. What I don't understand is why a return value that is clearly an int, is being converted into a long int, and then leading to an exception.
Cheers
Peyman Askari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100428/8e589620/attachment.html>
More information about the Python-list
mailing list