gh-130664: support '_' (just as ',') in Decimal's formatting (#132155)

This commit is contained in:
Sergey B Kirpichev 2025-04-15 13:38:03 +03:00 committed by GitHub
parent c66ffcf8e3
commit e10fe81cc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 1 deletions

View file

@ -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'),