-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
gh-122450: Expand documentation for Rational
and Fraction
#136800
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look also at the paragraph before the constructor description: "A Fraction instance can be constructed from a pair of integers, from another rational number, or from a string." It is outdated. The numbers in the pair can be not only integers, and the single numerical argument can be not only rational. Making it more precise will only lead to repetition, so I would make it more generic instead.
This comment was marked as resolved.
This comment was marked as resolved.
Rational
and Fraction
This comment was marked as resolved.
This comment was marked as resolved.
I'll wait until tomorrow to merge in case others have comments. A |
Co-authored-by: Serhiy Storchaka <[email protected]>
Can you handle the backports? A |
Thanks @skirpichev for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
Sorry, @skirpichev and @AA-Turner, I could not cleanly backport this to
|
Sorry, @skirpichev and @AA-Turner, I could not cleanly backport this to
|
Sure, I will. |
…raction`` (pythonGH-136800) (cherry picked from commit b266fbc) Co-authored-by: Sergey B Kirpichev <[email protected]> Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
GH-137363 is a backport of this pull request to the 3.14 branch. |
…`` (python#136800) Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> (cherry picked from commit b266fbc)
…`` (python#136800) Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> (cherry picked from commit b266fbc)
GH-137367 is a backport of this pull request to the 3.13 branch. |
|
…n`` (#136800) (#137367) Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Hugo Sansaqua [email protected]
denominator
ofFraction
is positive, which should be documented #122450Links: