]> granicus.if.org Git - python/commitdiff
atof: correct parameter name
authorSkip Montanaro <skip@pobox.com>
Sat, 10 Apr 2004 16:39:32 +0000 (16:39 +0000)
committerSkip Montanaro <skip@pobox.com>
Sat, 10 Apr 2004 16:39:32 +0000 (16:39 +0000)
Lib/locale.py

index 192c91f1de296d19b60719977fb087fec3e7b301..6e509a6aad194d9a9c29dc50a46c71e2178e73a4 100644 (file)
@@ -164,13 +164,13 @@ def atof(string,func=float):
     #First, get rid of the grouping
     ts = localeconv()['thousands_sep']
     if ts:
-        str = str.replace(ts, '')
+        string = string.replace(ts, '')
     #next, replace the decimal point with a dot
     dd = localeconv()['decimal_point']
     if dd:
-        str = str.replace(dd, '.')
+        string = string.replace(dd, '.')
     #finally, parse the string
-    return func(str)
+    return func(string)
 
 def atoi(str):
     "Converts a string to an integer according to the locale settings."