]> granicus.if.org Git - python/commitdiff
bpo-10379: Add %char examples to locale.format() docs (GH-1145)
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 20 Apr 2017 04:38:43 +0000 (07:38 +0300)
committerGitHub <noreply@github.com>
Thu, 20 Apr 2017 04:38:43 +0000 (07:38 +0300)
Doc/library/locale.rst

index 181f534abe2c02c305bc8799bf0ee70c1f3319c8..69959a3451e016d68f9c96306aef87555052c8da 100644 (file)
@@ -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)