Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6190c1

Browse files
committed
Issue 15660: Clarify 0 prefix for width field in str.format doc.
1 parent d9c026f commit f6190c1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/string.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ instead.
368368
*width* is a decimal integer defining the minimum field width. If not
369369
specified, then the field width will be determined by the content.
370370

371-
If the *width* field is preceded by a zero (``'0'``) character, this enables
372-
zero-padding. This is equivalent to an *alignment* type of ``'='`` and a *fill*
373-
character of ``'0'``.
371+
Preceding the *width* field by a zero (``'0'``) character enables
372+
sign-aware zero-padding for numeric types. This is equivalent to a *fill*
373+
character of ``'0'`` with an *alignment* type of ``'='``.
374374

375375
The *precision* is a decimal number indicating how many digits should be
376376
displayed after the decimal point for a floating point value formatted with

0 commit comments

Comments
 (0)