From: Skip Montanaro Date: Sat, 10 Apr 2004 16:39:32 +0000 (+0000) Subject: atof: correct parameter name X-Git-Tag: v2.4a1~511 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=249369c7f074b71ab4484a61bd17eb4c3ff6485d;p=thirdparty%2FPython%2Fcpython.git atof: correct parameter name --- diff --git a/Lib/locale.py b/Lib/locale.py index 192c91f1de29..6e509a6aad19 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -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."