summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-12-14 13:28:26 (GMT)
committerGitHub <noreply@github.com>2024-12-14 13:28:26 (GMT)
commite2325c9db0650fc06d909eb2b5930c0573f24f71 (patch)
tree90ec709d40ca7b208489e0938bd8425806e4cd20 /Doc
parent78e766f2e217572eacefba9ec31396b016aa88c2 (diff)
downloadcpython-e2325c9db0650fc06d909eb2b5930c0573f24f71.zip
cpython-e2325c9db0650fc06d909eb2b5930c0573f24f71.tar.gz
cpython-e2325c9db0650fc06d909eb2b5930c0573f24f71.tar.bz2
gh-127852: add remark about ',' separator (#127854)
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>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/string.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index a000bb4..913672a 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -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.