[Python-checkins] Document func parameter of locale.atof (GH-18183)
JelleZijlstra
webhook-mailer at python.org
Sat Apr 2 15:52:15 EDT 2022
https://github.com/python/cpython/commit/208da6d508bb2683732151f4ae288dfc8001267c
commit: 208da6d508bb2683732151f4ae288dfc8001267c
branch: main
author: Kevin Locke <kevin at kevinlocke.name>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2022-04-02T12:52:05-07:00
summary:
Document func parameter of locale.atof (GH-18183)
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 at kevinlocke.name>
files:
M Doc/library/locale.rst
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
index 1b147342cef14..01e14a151d299 100644
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -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)
More information about the Python-checkins
mailing list