8000 gh-87790: support thousands separators for formatting fractional part of Fraction by skirpichev · Pull Request #132204 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-87790: support thousands separators for formatting fractional part of Fraction #132204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into frac-sep-Fraction/87790
  • Loading branch information
skirpichev authored Jun 24, 2025
commit 074a34962b9f5bbe4877362cdeb92bc034974ac0
2 changes: 1 addition & 1 deletion Lib/fractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def _round_to_figures(n, d, figures):
(?P<thousands_sep>[,_])?
(?:\.
(?=[,_0-9]) # lookahead for digit or separator
(?P<precision>0|(?!0)[0-9]+)?
(?P<precision>[0-9]+)?
(?P<frac_separators>[,_])?
)?
(?P<presentation_type>[eEfFgG%])
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0