From: SourceForge.net <no...@so...> - 2007-08-17 15:34:37
|
Bugs item #1774886, was opened at 2007-08-15 19:35 Message generated for change (Comment added) made by mastrodomenico You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1774886&group_id=12867 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Pekka Laukkanen (laukpe) Assigned to: Nobody/Anonymous (nobody) Summary: int(1e10) -> OverflowError Initial Comment: Jython 2.2rc3 on java1.6.0 Type "copyright", "credits" or "license" for more information. >>> int(1e10) Traceback (innermost last): File "<console>", line 1, in ? OverflowError: float too large to convert >>> int(1e9) 1000000000 >>> long(1e10) 10000000000L Python 2.5.1 (r251:54863, May 2 2007, 16:56:35) [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> int(1e10) 10000000000L >>> long(1e10) 10000000000L ---------------------------------------------------------------------- Comment By: Lino Mastrodomenico (mastrodomenico) Date: 2007-08-17 17:34 Message: Logged In: YES user_id=93451 Originator: NO I guess this can be considered the "correct" behaviour for bugward compatibility with CPython 2.2. Python 2.2.3 (#1, Mar 4 2007, 00:49:18) [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> int(1e10) Traceback (most recent call last): File "<stdin>", line 1, in ? OverflowError: float too large to convert Was fixed in CPython 2.3 (returns 10000000000L) and 3.0 (returns 10000000000, without the funny "L" at the end) as part of PEP 237: http://www.python.org/dev/peps/pep-0237/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112867&aid=1774886&group_id=12867 |