Skip to content

Commit

Permalink
pythongh-127852: add remark about ',' separator (pythonGH-127854)
Browse files Browse the repository at this point in the history
Specify that it is valid for floats and ints with 'd' presentation and an error otherwise.

Co-authored-by: Terry Jan Reedy <[email protected]>

---------

(cherry picked from commit e2325c9)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
  • Loading branch information
2 people authored and miss-islington committed Dec 14, 2024
1 parent 2996a2b commit 7f57894
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ conversions, trailing zeros are not removed from the result.

.. index:: single: , (comma); in string formatting

The ``','`` option signals the use of a comma for a thousands separator.
The ``','`` option signals the use of a comma for a thousands separator for
floating-point presentation types and for integer presentation type ``'d'``.
For other presentation types, this option is an error.
For a locale aware separator, use the ``'n'`` integer presentation type
instead.

Expand Down

0 comments on commit 7f57894

Please sign in to comment.