Skip to content

Commit 208da6d

Browse files
authored
Document func parameter of locale.atof (GH-18183)
The second parameter (named `func`) has been present since the `locale` module was introduced in eef1d4e, 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>
1 parent 677a879 commit 208da6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/library/locale.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ The :mod:`locale` module defines the following exception and functions:
437437
.. versionadded:: 3.10
438438

439439

440-
.. function:: atof(string)
440+
.. function:: atof(string, func=float)
441441

442-
Converts a string to a floating point number, following the :const:`LC_NUMERIC`
443-
settings.
442+
Converts a string to a number, following the :const:`LC_NUMERIC` settings,
443+
by calling *func* on the result of calling :func:`delocalize` on *string*.
444444

445445

446446
.. function:: atoi(string)

0 commit comments

Comments
 (0)