diff options
-rw-r--r-- | Lib/string.py | 4 | ||||
-rw-r--r-- | Lib/stringold.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/string.py b/Lib/string.py index f2c3744..1a0f530 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -374,7 +374,7 @@ def atoi(str, base=10): # We only get here if strop doesn't define atoi() raise ValueError, "this string.atoi doesn't support base != 10" sign = '' - s = str + s = strip(str) if s and s[0] in '+-': sign = s[0] s = s[1:] @@ -403,7 +403,7 @@ def atol(str, base=10): # We only get here if strop doesn't define atol() raise ValueError, "this string.atol doesn't support base != 10" sign = '' - s = str + s = strip(str) if s and s[0] in '+-': sign = s[0] s = s[1:] diff --git a/Lib/stringold.py b/Lib/stringold.py index f2c3744..1a0f530 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -374,7 +374,7 @@ def atoi(str, base=10): # We only get here if strop doesn't define atoi() raise ValueError, "this string.atoi doesn't support base != 10" sign = '' - s = str + s = strip(str) if s and s[0] in '+-': sign = s[0] s = s[1:] @@ -403,7 +403,7 @@ def atol(str, base=10): # We only get here if strop doesn't define atol() raise ValueError, "this string.atol doesn't support base != 10" sign = '' - s = str + s = strip(str) if s and s[0] in '+-': sign = s[0] s = s[1:] |