From: Andreas K. <an...@mt...> - 2003-01-20 14:47:07
|
Am Sonntag, 19. Januar 2003 01:44 schrieb Davide Venturelli: > Hi, thanks for your work about Jython. > I'm new to this tool, and i have a problem. > > Line 26 of my program is: > > MAX_ID =3D 2**40 Try: MAX_ID =3D 2L**40 >>> 2L**40 1099511627776L >>> 2**40 Traceback (innermost last): File "<console>", line 1, in ? OverflowError: integer pow() By the way, the same thing happens in Python2.1 (which is the peer of=20 Jython2.1): Python 2.1.3 (#1, Jul 29 2002, 22:34:51) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> 2**40 Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: integer exponentiation Basically, cpython got the capability to convert an integer to a long int= eger=20 on overflow quite recently. Jython hasn't yet included this change. Andreas |