diff options
author | Pete Wicken <2273100+JamoBox@users.noreply.github.com> | 2020-02-21 05:53:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 21:53:12 -0800 |
commit | 424e5686d82235e08f8108b8bbe034bc91421689 (patch) | |
tree | 5fbd255637ab4a4211a37e6cdcfefd5b6436ffcd /Doc/library | |
parent | 933fc53f3f9c64ffa703b1f23a93bec560faea57 (diff) | |
download | cpython-git-424e5686d82235e08f8108b8bbe034bc91421689.tar.gz |
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
Make the definition of the width more explicit that it includes any
extra signs added by other options.
https://bugs.python.org/issue38657
Automerge-Triggered-By: @Mariatta
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/string.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index e2983db1ac..89c169a512 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -415,8 +415,9 @@ error. .. versionchanged:: 3.6 Added the ``'_'`` option (see also :pep:`515`). -*width* is a decimal integer defining the minimum field width. If not -specified, then the field width will be determined by the content. +*width* is a decimal integer defining the minimum total field width, +including any prefixes, separators, and other formatting characters. +If not specified, then the field width will be determined by the content. When no explicit alignment is given, preceding the *width* field by a zero (``'0'``) character enables |