bpo-33073: Adding as_integer_ratio to ints.#8750
Conversation
|
@lisroach Thanks for the update. I've pushed a commit that should fix the failing test_doctest. |
Sorry, something went wrong.
mdickinson
left a comment
There was a problem hiding this comment.
@lisroach If you're okay with my recent updates, I think this PR is ready to merge.
Sorry, something went wrong.
mdickinson
left a comment
There was a problem hiding this comment.
Changing my approval due to the issues Serhiy noted. @lisroach do you want to tackle the outstanding comments? I'm happy to pick this up if not.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
I have made the requested changes; please review again. I am not sure if I could do the boolean check better- somehow in one line? I'm open to advice! Thanks for all the reviews @mdickinson and @serhiy-storchaka it's been really helpful! |
Sorry, something went wrong.
|
@eric-wieser I believe Serhiy's thinking is correct, it should be (1, 1). >>> class Int(int):
... pass
...
>>> x = Int(42)
>>> type(+x)
<class 'int'>
>>> type(+True)
<class 'int'> |
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
Am checking to see the Serhiy's issues are resolved.
|
Reviving a comment hidden away above - should |
Sorry, something went wrong.
Despite the missing null check and invalid C syntax that works only because of a macro? |
Sorry, something went wrong.
|
Eric, I didn't see your comments prior to merging. See PR 9297 for the cleanup. The part that was fine as-is was using PyTuple_Pack() on two different code paths. |
Sorry, something went wrong.
|
Agreed, the two code paths thing was unimportant. #9297 seems to address all my comments, other than the question about |
Sorry, something went wrong.
|
Can you note your review on 9297 please. |
Sorry, something went wrong.
|
If that's aimed at me, I don't know what you're asking me to do. |
Sorry, something went wrong.
serhiy-storchaka
left a comment
There was a problem hiding this comment.
This PR was merged too soon. There are several issues with it. See also comments by @sir-sigurd and @eric-wieser.
Sorry, something went wrong.
This is a different issue. And I think that it should not. |
Sorry, something went wrong.
Adding as_integer_ratio to ints to make them more interoperable with floats.
https://bugs.python.org/issue33073