]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
authorPete Wicken <2273100+JamoBox@users.noreply.github.com>
Fri, 21 Feb 2020 05:53:12 +0000 (05:53 +0000)
committerGitHub <noreply@github.com>
Fri, 21 Feb 2020 05:53:12 +0000 (21:53 -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
Doc/library/string.rst

index e2983db1ac832198a14b85dedf0847613d029b0d..89c169a512b520f45972cefed971f6e287e86296 100644 (file)
@@ -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