From 316974382af3c683909634bbf58ec17211c5bcd5 Mon Sep 17 00:00:00 2001 From: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Date: Mon, 7 Apr 2025 15:02:49 +0300 Subject: [PATCH] gh-131912: Use different grouping options for the integral and fractional parts (#132170) --- Doc/library/string.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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:: -- 2.47.3