From: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:02:49 +0000 (+0300) Subject: gh-131912: Use different grouping options for the integral and fractional parts ... X-Git-Tag: v3.14.0a7~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=316974382af3c683909634bbf58ec17211c5bcd5;p=thirdparty%2FPython%2Fcpython.git gh-131912: Use different grouping options for the integral and fractional parts (#132170) --- diff --git a/Doc/library/string.rst b/Doc/library/string.rst index f2f3ab9eefdd..5e2f35497cbe 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -737,10 +737,10 @@ Using the comma or the underscore as a digit group separator:: '4996_02d2' >>> '{:_}'.format(123456789.123456789) '123_456_789.12345679' - >>> '{:._}'.format(123456789.123456789) - '123456789.123_456_79' - >>> '{:_._}'.format(123456789.123456789) - '123_456_789.123_456_79' + >>> '{:.,}'.format(123456789.123456789) + '123456789.123,456,79' + >>> '{:,._}'.format(123456789.123456789) + '123,456,789.123_456_79' Expressing a percentage::