summaryrefslogtreecommitdiff
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-05-10 12:01:23 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-05-10 12:01:23 +0300
commitdba903993a8d3e13d2cf83d6a8912e908025b17b (patch)
treeb0f7d957452d40ce384e5d0a1382067e3379f60f /Doc/library/string.rst
parent387235085c5a6a1d823b0af3fabb42830c88f984 (diff)
downloadcpython-git-dba903993a8d3e13d2cf83d6a8912e908025b17b.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 1da0c670a9..d5d24301b6 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -234,12 +234,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