From: Jelle Zijlstra Date: Sat, 2 Apr 2022 22:59:41 +0000 (-0700) Subject: [3.10] Document func parameter of locale.atof (GH-18183) (GH-32262) X-Git-Tag: v3.10.5~211 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a930062d257b066705c9a681aa6c7f0f342dea11;p=thirdparty%2FPython%2Fcpython.git [3.10] Document func parameter of locale.atof (GH-18183) (GH-32262) 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 (cherry picked from commit 208da6d508bb2683732151f4ae288dfc8001267c) Co-authored-by: Kevin Locke --- diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst index 60d0c59d017c..dd14a379b0c6 100644 --- a/Doc/library/locale.rst +++ b/Doc/library/locale.rst @@ -435,10 +435,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)