Skip to content

Commit

Permalink
bpo-38657: Clarify numeric padding behaviour in string formatting (GH…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
JamoBox committed Feb 21, 2020
1 parent 933fc53 commit 424e568
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Doc/library/string.rst
Expand Up @@ -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
Expand Down

0 comments on commit 424e568

Please sign in to comment.