Mercurial > cpython-lru_cache-weakref
diff Doc/library/string.rst @ 62700:fa16acb2ffdd legacy-trunk
#9139: the thousands separator is new in 2.7. Also add a missing variable in the example.
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Fri, 02 Jul 2010 22:50:39 +0000 |
| parents | 43c04711aacb |
| children | ff734f225b47 |
line wrap: on
line diff
--- a/Doc/library/string.rst Fri Jul 02 22:17:29 2010 +0000 +++ b/Doc/library/string.rst Fri Jul 02 22:50:39 2010 +0000 @@ -378,6 +378,9 @@ For a locale aware separator, use the ``'n'`` integer presentation type instead. +.. versionchanged:: 2.7 + Added the ``','`` option (see also :pep:`378`). + *width* is a decimal integer defining the minimum field width. If not specified, then the field width will be determined by the content. @@ -531,6 +534,7 @@ Accessing arguments' attributes:: + >>> c = 3-5j >>> ('The complex number {0} is formed from the real part {0.real} ' ... 'and the imaginary part {0.imag}.').format(c) 'The complex number (3-5j) is formed from the real part 3.0 and the imaginary part -5.0.'
