Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-67790: Support float-style formatting for Fraction instances#100161
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
34 commits Select commitHold shift + click to select a range
8cf8d31 Add '.f' formatting for Fraction objects
mdickinsone9db697 Add support for % and F format specifiers
mdickinson6491b04 Add support for 'z' flag
mdickinson4551468 Tidy up of business logic
mdickinson43d34fc Add support for 'e' presentation type
mdickinsonf8dfcb9 Add support for 'g' presentation type; tidy
mdickinson6bfbc6c Tidying
mdickinson48629b7 Add news entry
mdickinson3d21af2 Add documentation
mdickinsonc86a57e Add what's new entry
mdickinsonb521efb Fix backticks:
mdickinsonaac576e Fix more missing backticks
mdickinsonb9ee0ff Fix indentation
mdickinson1c8b8a9 Wordsmithing for consistency with other method definitions
mdickinson9dbde3b Add link to the format specification mini-language
mdickinson2dd48bb Fix: not true that thousands separators cannot have an effect for the…
mdickinson983726f Fix typo in comment
mdickinsonb7e5129 Tweak docstring and comments for _round_to_exponent
mdickinsoncb5e234 Second pass on docstring and comments for _round_to_figures
mdickinson907487e Add tests for the corner case of zero minimum width + alignment
mdickinsonaba35f3 Tests for the case of zero padding _and_ a zero minimum width
mdickinsonfc4d3b5 Cleanup of __format__ method
mdickinson4ccdf94 Add test cases from original issue and discussion thread
mdickinsonb358b37 Merge branch 'main' into fraction-format
mdickinson67e020c Tighten up the regex - extra leading zeros not permitted
mdickinsone240c70 Merge remote-tracking branch 'mdickinson/fraction-format' into fracti…
mdickinson111c41f Add tests for a few more fill character corner cases
mdickinsond8cc3d6 Merge remote-tracking branch 'upstream/main' into fraction-format
mdickinsonfff3751 Add testcases for no presentation type with an integral fraction
mdickinson0b8bfa6 Rename the regex to allow for future API expansion
mdickinson54ed402 Tweak comment
mdickinsone3a5fd2 Tweak algorithm comments
mdickinson098d34c Fix incorrect acceptance of Z instead of z
mdickinson2c476a2 Use consistent quote style in tests
mdickinsonFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
Add documentation
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit3d21af2b6bb4656c603a8ef1cc6f3f1de3d0a7a1
There are no files selected for viewing
29 changes: 29 additions & 0 deletionsDoc/library/fractions.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.