summaryrefslogtreecommitdiffstats
path: root/Lib/stringold.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-03-30 17:22:30 (GMT)
committerGuido van Rossum <guido@python.org>1998-03-30 17:22:30 (GMT)
commita6bb6be95f4a04fdf7a09fcc92432273877af049 (patch)
treee720494c8a6f7b143124dba5fac970118054536c /Lib/stringold.py
parenta08fabad72af05d7c4f47823793e602447df957f (diff)
downloadcpython-a6bb6be95f4a04fdf7a09fcc92432273877af049.zip
cpython-a6bb6be95f4a04fdf7a09fcc92432273877af049.tar.gz
cpython-a6bb6be95f4a04fdf7a09fcc92432273877af049.tar.bz2
Strip argument to atol and atof to match what strop does better.
Diffstat (limited to 'Lib/stringold.py')
-rw-r--r--Lib/stringold.py4
1 files changed, 2 insertions, 2 deletions
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:]