Mercurial > cpython-lru_cache-weakref
diff Lib/stringold.py @ 7772:9172931fd80a legacy-trunk
Strip argument to atol and atof to match what strop does better.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Mon, 30 Mar 1998 17:22:30 +0000 |
| parents | b4b0e4e759c5 |
| children | 96aa58725c0e |
line wrap: on
line diff
--- a/Lib/stringold.py Mon Mar 30 17:17:24 1998 +0000 +++ b/Lib/stringold.py Mon Mar 30 17:22:30 1998 +0000 @@ -374,7 +374,7 @@ # 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 @@ # 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:]
