Skip to content

Commit d26c426

Browse files
committed
gh-130664: specify how thousands separators are used with 0-padding
1 parent 98fa4a4 commit d26c426

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/string.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ If not specified, then the field width will be determined by the content.
449449
When no explicit alignment is given, preceding the *width* field by a zero
450450
(``'0'``) character enables sign-aware zero-padding for numeric types,
451451
excluding :class:`complex`. This is equivalent to a *fill* character of
452-
``'0'`` with an *alignment* type of ``'='``.
452+
``'0'`` with an *alignment* type of ``'='``. If thousands separators
453+
are used (as specified either by ``'_'`` or ``','`` option), they placed
454+
also between leading zeros.
453455

454456
.. versionchanged:: 3.10
455457
Preceding the *width* field by ``'0'`` no longer affects the default

0 commit comments

Comments
 (0)