]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127852: add remark about ',' separator (#127854)
authorSergey B Kirpichev <skirpichev@gmail.com>
Sat, 14 Dec 2024 13:28:26 +0000 (16:28 +0300)
committerGitHub <noreply@github.com>
Sat, 14 Dec 2024 13:28:26 +0000 (08:28 -0500)
Specify that it is valid for floats and ints with 'd' presentation and an error otherwise.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Doc/library/string.rst

index a000bb49f148006bee24a296da70d41a5bb10e1f..913672a3ff22703fbfd4e61c664ba8b970f44d83 100644 (file)
@@ -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.