]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131912: Use different grouping options for the integral and fractional parts ...
authorPrometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Mon, 7 Apr 2025 12:02:49 +0000 (15:02 +0300)
committerGitHub <noreply@github.com>
Mon, 7 Apr 2025 12:02:49 +0000 (14:02 +0200)
Doc/library/string.rst

index f2f3ab9eefdd5006995dc35f76f15fbaf24f52ab..5e2f35497cbe86596475e86dd377ec3d11ca1660 100644 (file)
@@ -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::