mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130664: support '_' (just as ',') in Decimal's formatting (#132155)
This commit is contained in:
parent
c66ffcf8e3
commit
e10fe81cc6
3 changed files with 8 additions and 1 deletions
|
@ -1083,6 +1083,11 @@ class FormatTest:
|
|||
(',%', '123.456789', '12,345.6789%'),
|
||||
(',e', '123456', '1.23456e+5'),
|
||||
(',E', '123456', '1.23456E+5'),
|
||||
# ... with '_' instead
|
||||
('_', '1234567', '1_234_567'),
|
||||
('07_', '1234.56', '1_234.56'),
|
||||
('_', '1.23456789', '1.23456789'),
|
||||
('_%', '123.456789', '12_345.6789%'),
|
||||
|
||||
# negative zero: default behavior
|
||||
('.1f', '-0', '-0.0'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue