diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2022-04-02 22:59:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-02 22:59:57 (GMT) |
commit | 62da258a455974014ddc3a40466724bb815f862d (patch) | |
tree | bb4a009639bb9ddb9dc73b98d6aa660b8c929ba6 | |
parent | 694425817ba2b3a796acb3413a7111f6de4bd086 (diff) | |
download | cpython-62da258a455974014ddc3a40466724bb815f862d.zip cpython-62da258a455974014ddc3a40466724bb815f862d.tar.gz cpython-62da258a455974014ddc3a40466724bb815f862d.tar.bz2 |
[3.9] Document func parameter of locale.atof (GH-18183) (GH-32261)
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>.
(cherry picked from commit 208da6d508bb2683732151f4ae288dfc8001267c)
Co-authored-by: Kevin Locke <kevin@kevinlocke.name>
-rw-r--r-- | Doc/library/locale.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst index bf57a08..5b5a0c7 100644 --- a/Doc/library/locale.rst +++ b/Doc/library/locale.rst @@ -423,10 +423,10 @@ The :mod:`locale` module defines the following exception and functions: .. versionadded:: 3.5 -.. 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) |