summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-04-20 04:38:43 (GMT)
committerGitHub <noreply@github.com>2017-04-20 04:38:43 (GMT)
commit6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688 (patch)
treeb63dd74f682357cb2c5f7ee9028bc8047a6590ba /Doc
parent8526fb74edf5ac9ca175b7cdcb0d82bb8780d2cf (diff)
downloadcpython-6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688.zip
cpython-6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688.tar.gz
cpython-6dbdedb0b18a5ca850ab8ce512fda24d5a9d0688.tar.bz2
bpo-10379: Add %char examples to locale.format() docs (GH-1145)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/locale.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
index 181f534..69959a3 100644
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -371,13 +371,14 @@ The :mod:`locale` module defines the following exception and functions:
.. function:: format(format, val, grouping=False, monetary=False)
- Please note that this function works like format_string but will only work
- for exactly one %char specifier.
+ Please note that this function works like :meth:`format_string` but will
+ 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`.
.. deprecated:: 3.7
- Use :meth:`format_string` instead
+ Use :meth:`format_string` instead.
.. function:: currency(val, symbol=True, grouping=False, international=False)