summaryrefslogtreecommitdiff
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-10 12:01:56 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-10 12:01:56 +0300
commitc499f30286976410be13c8476408531bb21631ce (patch)
tree86b8972b6663726a50d716bb13773171f1ca425a /Doc/library/string.rst
parenta4dfbe608fb52191b435c5545e8a343586887135 (diff)
parentdba903993a8d3e13d2cf83d6a8912e908025b17b (diff)
downloadcpython-git-c499f30286976410be13c8476408531bb21631ce.tar.gz
Issue #23921: Standardized documentation whitespace formatting.
Original patch by James Edwards.
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r--Doc/library/string.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 4eb2db41c4..c421c72d75 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -236,12 +236,12 @@ does an index lookup using :func:`__getitem__`.
Some simple format string examples::
- "First, thou shalt count to {0}" # References first positional argument
- "Bring me a {}" # Implicitly references the first positional argument
- "From {} to {}" # Same as "From {0} to {1}"
- "My quest is {name}" # References keyword argument 'name'
- "Weight in tons {0.weight}" # 'weight' attribute of first positional arg
- "Units destroyed: {players[0]}" # First element of keyword argument 'players'.
+ "First, thou shalt count to {0}" # References first positional argument
+ "Bring me a {}" # Implicitly references the first positional argument
+ "From {} to {}" # Same as "From {0} to {1}"
+ "My quest is {name}" # References keyword argument 'name'
+ "Weight in tons {0.weight}" # 'weight' attribute of first positional arg
+ "Units destroyed: {players[0]}" # First element of keyword argument 'players'.
The *conversion* field causes a type coercion before formatting. Normally, the
job of formatting a value is done by the :meth:`__format__` method of the value