diff -r d499189e7758 Doc/library/string.rst --- a/Doc/library/string.rst Fri Apr 19 22:38:58 2013 -0400 +++ b/Doc/library/string.rst Fri Apr 19 23:03:29 2013 -0400 @@ -203,26 +203,27 @@ conversion: "r" | "s" | "a" format_spec: -In less formal terms, the replacement field can start with a *field_name* that specifies -the object whose value is to be formatted and inserted -into the output instead of the replacement field. -The *field_name* is optionally followed by a *conversion* field, which is -preceded by an exclamation point ``'!'``, and a *format_spec*, which is preceded -by a colon ``':'``. These specify a non-default format for the replacement value. +In less formal terms, the replacement field can start with a *field_name* that +specifies the object whose value is to be formatted and inserted into the +output instead of the replacement field. The *field_name* is optionally +followed by a *conversion* field, which is preceded by an exclamation point +``'!'``, and a *format_spec*, which is preceded by a colon ``':'``. These +specify a non-default format for the replacement value. See also the :ref:`formatspec` section. The *field_name* itself begins with an *arg_name* that is either a number or a -keyword. If it's a number, it refers to a positional argument, and if it's a keyword, -it refers to a named keyword argument. If the numerical arg_names in a format string -are 0, 1, 2, ... in sequence, they can all be omitted (not just some) -and the numbers 0, 1, 2, ... will be automatically inserted in that order. -Because *arg_name* is not quote-delimited, it is not possible to specify arbitrary -dictionary keys (e.g., the strings ``'10'`` or ``':-]'``) within a format string. -The *arg_name* can be followed by any number of index or -attribute expressions. An expression of the form ``'.name'`` selects the named -attribute using :func:`getattr`, while an expression of the form ``'[index]'`` -does an index lookup using :func:`__getitem__`. +keyword. If it's a number, it refers to a positional argument, and if it's a +keyword, it refers to a named keyword argument. If the numerical arg_names in +a format string are 0, 1, 2, ... in sequence, they can all be omitted (not +just some) and the numbers 0, 1, 2, ... will be automatically inserted in that +order. Numerical arg_names that are negative and negative slices are not +supported. Because *arg_name* is not quote-delimited, it is not possible to +specify arbitrary dictionary keys (e.g., the strings ``'10'`` or ``':-]'``) +within a format string. The *arg_name* can be followed by any number of index +or attribute expressions. An expression of the form ``'.name'`` selects the +named attribute using :func:`getattr`, while an expression of the form +``'[index]'`` does an index lookup using :func:`__getitem__`. .. versionchanged:: 3.1 The positional argument specifiers can be omitted, so ``'{} {}'`` is