mirror of
https://github.com/python/cpython.git
synced 2024-11-23 09:54:58 +08:00
atof: correct parameter name
This commit is contained in:
parent
5bfd98498a
commit
249369c7f0
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user