Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-101773: Optimize creation of Fractions in private methods#101780

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
mdickinson merged 13 commits intopython:mainfromskirpichev:opt-fractions-new
Feb 27, 2023
Merged
Changes from1 commit
Commits
Show all changes
13 commits
Select commitHold shift + click to select a range
9cc62f7
gh-101773: Optimize creation of Fraction's in private methods
skirpichevFeb 10, 2023
836d3a6
Merge branch 'main' into opt-fractions-new
skirpichevFeb 10, 2023
3625d34
Adjust signature of _from_pair() and add docstring
skirpichevFeb 11, 2023
9e66b5a
Use new helper in from_float/Decimal
skirpichevFeb 11, 2023
4324391
Restore back _normalize kwarg for the Fraction.__new__()
skirpichevFeb 11, 2023
b0dca38
Amend 3625d34155
skirpichevFeb 11, 2023
3a8506d
Nitpick on docstring (int's -> ints)
skirpichevFeb 27, 2023
13262af
Revert "Restore back _normalize kwarg for the Fraction.__new__()"
skirpichevFeb 27, 2023
4e8977a
Rename: _from_pair -> _from_coprime_ints
skirpichevFeb 27, 2023
57ac373
Merge branch 'main' into opt-fractions-new
skirpichevFeb 27, 2023
4b4a386
Update Misc/NEWS.d/next/Library/2023-02-10-11-59-13.gh-issue-101773.J…
skirpichevFeb 27, 2023
580b1be
+1
skirpichevFeb 27, 2023
53d5e94
Tweak docstring wording
mdickinsonFeb 27, 2023
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
PrevPrevious commit
NextNext commit
Nitpick on docstring (int's -> ints)
  • Loading branch information
@skirpichev
skirpichev committedFeb 27, 2023
commit3a8506dc2b5962600fbe140956b03c495910e41c
2 changes: 1 addition & 1 deletionLib/fractions.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -317,7 +317,7 @@ def from_decimal(cls, dec):

@classmethod
def _from_pair(cls, numerator, denominator, /):
"""Convert a pair ofint's to a rational number, for internal use.
"""Convert a pair ofints to a rational number, for internal use.

The ratio of integers should be in lowest terms and
the denominator is positive.
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp