diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-03-20 21:06:15 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-03-20 21:06:15 -0400 |
commit | 5828467c53730481fa009618f5da5b1c42be0a3f (patch) | |
tree | 8b1e71eab8c6c91446961ab2cde65a9f5f422611 /Doc/library/string.rst | |
parent | f72ce5720cc1b7c04713b7936876806e541c0433 (diff) | |
parent | ee539dd6f77ecc530fa637441c67a884ff3bb5aa (diff) | |
download | cpython-5828467c53730481fa009618f5da5b1c42be0a3f.tar.gz |
Merge with 3.5
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r-- | Doc/library/string.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst index cda8e8682f..4eb2db41c4 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -331,7 +331,8 @@ The meaning of the various alignment options is as follows: | ``'='`` | Forces the padding to be placed after the sign (if any) | | | but before the digits. This is used for printing fields | | | in the form '+000000120'. This alignment option is only | - | | valid for numeric types. | + | | valid for numeric types. It becomes the default when '0'| + | | immediately precedes the field width. | +---------+----------------------------------------------------------+ | ``'^'`` | Forces the field to be centered within the available | | | space. | @@ -380,7 +381,8 @@ instead. *width* is a decimal integer defining the minimum field width. If not specified, then the field width will be determined by the content. -Preceding the *width* field by a zero (``'0'``) character enables +When no explicit alignment is given, preceding the *width* field by a zero +(``'0'``) character enables sign-aware zero-padding for numeric types. This is equivalent to a *fill* character of ``'0'`` with an *alignment* type of ``'='``. |