From 3a5b47976eb87be1540333c1cbec3b708b543e4f Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Thu, 12 Dec 2024 09:25:09 +0300 Subject: [PATCH 1/2] gh-127852: add remark about ',' separator --- Doc/library/string.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index a000bb49f14800..ed7e96a3c03809 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -409,7 +409,8 @@ 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 a locale aware separator, use the ``'n'`` integer presentation type instead. From 6cb4ceb11a68289d5189899719c7c6a5ef9e17cd Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Thu, 12 Dec 2024 14:46:51 +0300 Subject: [PATCH 2/2] Update Doc/library/string.rst Co-authored-by: Terry Jan Reedy --- Doc/library/string.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index ed7e96a3c03809..913672a3ff2270 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -411,6 +411,7 @@ conversions, trailing zeros are not removed from the result. 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.