]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 21 Feb 2020 06:05:58 +0000 (22:05 -0800)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2020 06:05:58 +0000 (22:05 -0800)
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
(cherry picked from commit 424e5686d82235e08f8108b8bbe034bc91421689)

Co-authored-by: Pete Wicken <2273100+JamoBox@users.noreply.github.com>
Doc/library/string.rst

index bbbfed273ee459c9250c21dcf4f75a961b315a2b..6cbe54963196af84f179b29bbe620a525203224d 100644 (file)
@@ -416,8 +416,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