Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-72902: improve Fraction constructor speed for typical inputs#134320
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This moves abc check for numbers.Rational - down.
There is a slight behaviour change here: for A minimal example:
I think the change is acceptable and would probably accept the PR. |
>>>help(fractions.Fraction.as_integer_ratio)Help on function as_integer_ratio in module fractions:as_integer_ratio(self) Return a pair of integers, whose ratio is equal to the original Fraction. The ratio is in lowest terms and has a positive denominator. |
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.
LGTM. 👍
175ba36
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This moves abc check for numbers.Rational - down.