]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-87790: support thousands separators for formatting fractional part of floats ...
authorSergey B Kirpichev <skirpichev@gmail.com>
Tue, 25 Feb 2025 15:27:07 +0000 (18:27 +0300)
committerGitHub <noreply@github.com>
Tue, 25 Feb 2025 15:27:07 +0000 (16:27 +0100)
commitf39a07be47cd9219eaf0e538ae32ad8239c88e66
tree1b57568378401b44c9ffd8d3f237b13694842b5c
parentfa6a8140dd2a72da6df2a7dfafbf07045debf64d
gh-87790: support thousands separators for formatting fractional part of floats (#125304)

```pycon
>>> f"{123_456.123_456:_._f}"  # Whole and fractional
'123_456.123_456'
>>> f"{123_456.123_456:_f}"    # Integer component only
'123_456.123456'
>>> f"{123_456.123_456:._f}"   # Fractional component only
'123456.123_456'
>>> f"{123_456.123_456:.4_f}"  # with precision
'123456.1_235'
```
Doc/library/string.rst
Doc/whatsnew/3.14.rst
Include/internal/pycore_unicodeobject.h
Lib/test/test_float.py
Lib/test/test_format.py
Misc/NEWS.d/next/Core_and_Builtins/2024-10-11-10-41-05.gh-issue-87790.mlfEGl.rst [new file with mode: 0644]
Objects/stringlib/localeutil.h
Objects/unicodeobject.c
Python/formatter_unicode.c