Skip to content

Commit

Permalink
[3.13] gh-127852: add remark about ',' separator (GH-127854) (#127941)
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.
---------

(cherry picked from commit e2325c9)

Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2024
1 parent 2996a2b commit 9c6bd27
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 9c6bd27

Please sign in to comment.