Skip to content

Commit 3d7b5b3

Browse files
miss-islingtonskirpichevterryjreedy
authored
[3.12] gh-127852: add remark about ',' separator (GH-127854) (#127942)
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]>
1 parent d036855 commit 3d7b5b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/string.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ conversions, trailing zeros are not removed from the result.
409409

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

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

0 commit comments

Comments
 (0)