]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Document func parameter of locale.atof (GH-18183)
authorKevin Locke <kevin@kevinlocke.name>
Sat, 2 Apr 2022 19:52:05 +0000 (19:52 +0000)
committerGitHub <noreply@github.com>
Sat, 2 Apr 2022 19:52:05 +0000 (12:52 -0700)
The second parameter (named `func`) has been present since the `locale`
module was introduced in eef1d4e8b1, but has never been documented.

This commit updates the documentation for `locale.atof` to clarify the
behavior of the function and how the `func` parameter is used.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Doc/library/locale.rst

index 1b147342cef1426b366bd44fb2fe5f835f126d16..01e14a151d299c5216e5a87cd3cb869846eeb56f 100644 (file)
@@ -437,10 +437,10 @@ The :mod:`locale` module defines the following exception and functions:
     .. versionadded:: 3.10
 
 
-.. function:: atof(string)
+.. function:: atof(string, func=float)
 
-   Converts a string to a floating point number, following the :const:`LC_NUMERIC`
-   settings.
+   Converts a string to a number, following the :const:`LC_NUMERIC` settings,
+   by calling *func* on the result of calling :func:`delocalize` on *string*.
 
 
 .. function:: atoi(string)