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

bpo-37822: Add math.as_integer_ratio().#15210

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

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedAug 11, 2019
edited by bedevere-bot
Loading

@jdemeyer
Copy link
Contributor

I think it would be good to define more precisely what are the output types. We require the output ofas_integer_ratio to be two integers, but what does "integer" mean in this context? A Pythonint? An object which implements__index__? An instance ofnumbers.Integral?

My personal vote would be to require__index__ (I don't mean that we should check that condition, but we should document it).

Copy link
Member

@brandtbucherbrandtbucher left a comment

Choose a reason for hiding this comment

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

One small issue I noticed:

math.as_integer_ratio
x: object
/
greatest common divisor of x and y
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a copy-paste error. Maybe:

Suggested change
greatestcommondivisorofxandy
Returntherationalrepresentationofxasthepair (numerator,denominator).

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Thank you. But this proposition was rejected.

@serhiy-storchakaserhiy-storchaka deleted the math-as_integer_ratio branchAugust 24, 2019 09:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@brandtbucherbrandtbucherbrandtbucher requested changes

@mdickinsonmdickinsonAwaiting requested review from mdickinson

@rhettingerrhettingerAwaiting requested review from rhettinger

Assignees

No one assigned

Labels

awaiting core reviewtype-featureA feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@serhiy-storchaka@jdemeyer@brandtbucher@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp