diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-10 09:01:56 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-10 09:01:56 (GMT) |
commit | c499f30286976410be13c8476408531bb21631ce (patch) | |
tree | 86b8972b6663726a50d716bb13773171f1ca425a /Doc/library/string.rst | |
parent | a4dfbe608fb52191b435c5545e8a343586887135 (diff) | |
parent | dba903993a8d3e13d2cf83d6a8912e908025b17b (diff) | |
download | cpython-c499f30286976410be13c8476408531bb21631ce.zip cpython-c499f30286976410be13c8476408531bb21631ce.tar.gz cpython-c499f30286976410be13c8476408531bb21631ce.tar.bz2 |
Issue #23921: Standardized documentation whitespace formatting.
Original patch by James Edwards.
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r-- | Doc/library/string.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 4eb2db4..c421c72 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 |