Skip to content

Commit 6dbdedb

Browse files
authored
bpo-10379: Add %char examples to locale.format() docs (GH-1145)
1 parent 8526fb7 commit 6dbdedb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/locale.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,14 @@ The :mod:`locale` module defines the following exception and functions:
371371

372372
.. function:: format(format, val, grouping=False, monetary=False)
373373

374-
Please note that this function works like format_string but will only work
375-
for exactly one %char specifier.
374+
Please note that this function works like :meth:`format_string` but will
375+
only work for exactly one ``%char`` specifier. For example, ``'%f'`` and
376+
``'%.0f'`` are both valid specifiers, but ``'%f kB'`` is not.
376377

377378
For whole format strings, use :func:`format_string`.
378379

379380
.. deprecated:: 3.7
380-
Use :meth:`format_string` instead
381+
Use :meth:`format_string` instead.
381382

382383

383384
.. function:: currency(val, symbol=True, grouping=False, international=False)

0 commit comments

Comments
 (0)