https://github.com/python/cpython/commit/9c6bd272b40bbd8264a00413e94e8246f550275a commit: 9c6bd272b40bbd8264a00413e94e8246f550275a branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: terryjreedy <[email protected]> date: 2024-12-14T13:34:18Z summary:
[3.13] gh-127852: add remark about ',' separator (GH-127854) (#127941) Specify that it is valid for floats and ints with 'd' presentation and an error otherwise. --------- (cherry picked from commit e2325c9db0650fc06d909eb2b5930c0573f24f71) Co-authored-by: Sergey B Kirpichev <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]> files: M Doc/library/string.rst diff --git a/Doc/library/string.rst b/Doc/library/string.rst index a000bb49f14800..913672a3ff2270 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. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
