[Python-bugs-list] [ python-Bugs-629989 ] int("123123123123123123") doesn't work
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 06 Nov 2002 08:17:20 -0800
Bugs item #629989, was opened at 2002-10-28 18:33
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=629989&group_id=5470
Category: Type/class unification
Group: Python 2.3
Status: Open
Resolution: Accepted
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: Walter Dörwald (doerwalter)
>Summary: int("123123123123123123") doesn't work
Initial Comment:
Now that we're trying to remove the difference between
int and long, it seems fair that int() of a very long
decimal string should return a long rather than raising
ValueError.
----------------------------------------------------------------------
>Comment By: Walter Dörwald (doerwalter)
Date: 2002-11-06 17:17
Message:
Logged In: YES
user_id=89016
Checked in as:
Lib/test/test_b1.py 1.56
Objects/intobject.c 2.94
Objects/longobject.c 1.144
Should I open a seperate bug report for the int(1e200) case?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-06 17:00
Message:
Logged In: YES
user_id=6380
If it works, check it in.
----------------------------------------------------------------------
Comment By: Walter Dörwald (doerwalter)
Date: 2002-11-06 15:27
Message:
Logged In: YES
user_id=89016
How about the following patch (diff.txt): In addition to
creating longs when necessary, it fixes the problem of the
fixed 512 char unicode conversion buffer.
What should we do about int(1e200)?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=629989&group_id=5470