changeset: 78621:85cd54b2d3a1 branch: 2.7 parent: 78616:78b0f294674c user: Terry Jan Reedy date: Fri Aug 17 15:37:52 2012 -0400 files: Doc/library/string.rst description: Issue 15660: Clarify 0 prefix for width field in str.format doc. diff -r 78b0f294674c -r 85cd54b2d3a1 Doc/library/string.rst --- a/Doc/library/string.rst Fri Aug 17 15:00:58 2012 +0100 +++ b/Doc/library/string.rst Fri Aug 17 15:37:52 2012 -0400 @@ -389,9 +389,9 @@ *width* is a decimal integer defining the minimum field width. If not specified, then the field width will be determined by the content. -If the *width* field is preceded by a zero (``'0'``) character, this enables -zero-padding. This is equivalent to an *alignment* type of ``'='`` and a *fill* -character of ``'0'``. +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 ``'='``. The *precision* is a decimal number indicating how many digits should be displayed after the decimal point for a floating point value formatted with

AltStyle によって変換されたページ (->オリジナル) /