[Python-bugs-list] string bug in atoi (PR#55)
Barry A. Warsaw
firstname.lastname@example.org (Barry A. Warsaw)
Thu, 19 Aug 1999 12:08:05 -0400 (EDT)
>>>>> "sergio" == <email@example.com> writes:
| Full_Name: Sergio Baca
| Version: 1.52 and JPython last beta
| OS: Windows NT
| Submission from: sergio.mnc.md (188.8.131.52)
| I have found error in string module. This is a test program:
| from string import atoi
| str1 = "0x8e"
| print atoi(str1, 16)
| print atoi(str1)
This actually works as expected in CPython; the first one prints 142
and the second raises an exception (as expected, since the default
base is 10).
However, in JPython the first atoi() call does indeed give you a
traceback because it doesn't grok the second argument (i.e. the
optional base). This has already been reported as PR#153
so there's no need for you to resubmit it.