Skip to content

Commit d904f98

Browse files
committed
gh-131915: document 0-padding for string presentation type
1 parent 8680400 commit d904f98

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/string.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ If not specified, then the field width will be determined by the content.
426426
When no explicit alignment is given, preceding the *width* field by a zero
427427
(``'0'``) character enables sign-aware zero-padding for numeric types,
428428
excluding :class:`complex`. This is equivalent to a *fill* character of
429-
``'0'`` with an *alignment* type of ``'='``.
429+
``'0'`` with an *alignment* type of ``'='``. For strings this just enable
430+
zero-padding with the default (or specified) alignment.
430431

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

0 commit comments

Comments
 (0)