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-100488: Add is_integer method to fractions.Fraction#100489

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
hauntsaninja merged 3 commits intopython:mainfromhauntsaninja:fraction-is-integer
Jan 1, 2023

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninjahauntsaninja commentedDec 24, 2022
edited by bedevere-bot
Loading

JozGonzalez reacted with thumbs up emoji
@hauntsaninja
Copy link
ContributorAuthor

The documentation guarantees that denominator is in lowest term. It doesn't make any explicit guarantee about being positive, butas_integer_ratio does and just returns the denominator. But do let me know if I should change toabs(self._denominator) == 1 orself._numerator % self._denominator == 0!

Copy link
Member

@JelleZijlstraJelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(But let's wait for Mark to also give feedback.)

Copy link
Member

@mdickinsonmdickinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM; one reST markup nitpick.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
@hauntsaninjahauntsaninja merged commite83f88a intopython:mainJan 1, 2023
@hauntsaninjahauntsaninja deleted the fraction-is-integer branchJanuary 1, 2023 08:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mdickinsonmdickinsonmdickinson approved these changes

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@hauntsaninja@mdickinson@JelleZijlstra@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp