Skip to content

Commit f5e81d6

Browse files
committed
python#9139: the thousands separator is new in 2.7. Also add a missing variable in the example.
1 parent e11690a commit f5e81d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/string.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ The ``','`` option signals the use of a comma for a thousands separator.
378378
For a locale aware separator, use the ``'n'`` integer presentation type
379379
instead.
380380

381+
.. versionchanged:: 2.7
382+
Added the ``','`` option (see also :pep:`378`).
383+
381384
*width* is a decimal integer defining the minimum field width. If not
382385
specified, then the field width will be determined by the content.
383386

@@ -531,6 +534,7 @@ Accessing arguments by name::
531534

532535
Accessing arguments' attributes::
533536

537+
>>> c = 3-5j
534538
>>> ('The complex number {0} is formed from the real part {0.real} '
535539
... 'and the imaginary part {0.imag}.').format(c)
536540
'The complex number (3-5j) is formed from the real part 3.0 and the imaginary part -5.0.'

0 commit comments

Comments
 (0)