From d4b661a4bac7fabc16412b7042b59f6e603431a2 Mon Sep 17 00:00:00 2001 From: Richard Evans Date: Tue, 28 Aug 2018 10:27:02 +1000 Subject: [PATCH] Update comments for examples of format conversion --- Doc/library/string.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 0fec3df3e3c14e4..e0a610abb6adfc9 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -259,9 +259,9 @@ on the value, ``'!r'`` which calls :func:`repr` and ``'!a'`` which calls Some examples:: - "Harold's a clever {0!s}" # Calls str() on the argument first - "Bring out the holy {name!r}" # Calls repr() on the argument first - "More {!a}" # Calls ascii() on the argument first + "Harold's a clever {0!s}" # Calls str() on the first argument + "Bring out the holy {name!r}" # Calls repr() on a named argument + "More {!a}" # Calls ascii() on an implicit argument The *format_spec* field contains a specification of how the value should be presented, including such details as field width, alignment, padding, decimal