bpo-10379: Add %char examples to locale.format() docs (GH-1145)

This commit is contained in:
Berker Peksag 2017-04-20 07:38:43 +03:00 committed by GitHub
parent 8526fb74ed
commit 6dbdedb0b1
1 changed files with 4 additions and 3 deletions

View File

@ -371,13 +371,14 @@ The :mod:`locale` module defines the following exception and functions:
.. function:: format(format, val, grouping=False, monetary=False) .. function:: format(format, val, grouping=False, monetary=False)
Please note that this function works like format_string but will only work Please note that this function works like :meth:`format_string` but will
for exactly one %char specifier. only work for exactly one ``%char`` specifier. For example, ``'%f'`` and
``'%.0f'`` are both valid specifiers, but ``'%f kB'`` is not.
For whole format strings, use :func:`format_string`. For whole format strings, use :func:`format_string`.
.. deprecated:: 3.7 .. deprecated:: 3.7
Use :meth:`format_string` instead Use :meth:`format_string` instead.
.. function:: currency(val, symbol=True, grouping=False, international=False) .. function:: currency(val, symbol=True, grouping=False, international=False)