Skip to content

Use _PyLong_GetOne() in long_pow() #125474

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Use _PyLong_GetOne() in long_pow() #125474

wants to merge 2 commits into from

Conversation

hikariyo
Copy link

Just another place like what #125044 did. It makes code clearer.

@bedevere-app
Copy link

bedevere-app bot commented Oct 14, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@nineteendo
Copy link
Contributor

Can you update the branch?

@tomasr8 tomasr8 changed the title Complete what #125044 did Use _PyLong_GetOne() in long_pow() Oct 14, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 15, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@rruuaanng
Copy link
Contributor

Please add title label, like this

gh-<issue_id>: xxx

@hikariyo
Copy link
Author

Please add title label, like this

gh-<issue_id>: xxx

This is a trivial change which might skip issue 😊

@rruuaanng
Copy link
Contributor

And, this has been rejected by the core-dev, I don't think this modification is meaningful.

@hikariyo
Copy link
Author

hikariyo commented Oct 15, 2024

And, this has been rejected by the core-dev, I don't think this modification is meaningful.

But similar change has been merged as I mentioned, and I think the last PR has been rejected because it changed so many places which makes code ugly, different from this PR.

I think it is meaningful to keep the code style the same in the same file.

@rruuaanng
Copy link
Contributor

My suggestion is to open an issue and listen to other people's opinions.

@hikariyo
Copy link
Author

My suggestion is to open an issue and listen to other people's opinions.

Since a core-dev has approved similar change, and I'm just doing something to finish his incomplete change, it should be just fine.

I found this place when studying this file and want to do something to make the code style the same 🥲

@rruuaanng
Copy link
Contributor

You might be talking about this
https://github.com/python/cpython/pull/125044/files

In fact, changing the code style alone isn't allowed. You should also modify other functions to pass.

@hikariyo
Copy link
Author

Okay, sorry to trouble you 🙏.

@hikariyo hikariyo closed this Oct 15, 2024
@erlend-aasland
Copy link
Contributor

And, this has been rejected by the core-dev, I don't think this modification is meaningful.

@rruuaanng, please try and keep a polite tone.

@hikariyo: Thanks for the PR, but as has been noted, pretty much all code changes, including refactorings1, need issues. Please see the devguide for more info :)

Footnotes

  1. this PR counts as refactoring

@rruuaanng
Copy link
Contributor

And, this has been rejected by the core-dev, I don't think this modification is meaningful.

@rruuaanng, please try and keep a polite tone.

@hikariyo: Thanks for the PR, but as has been noted, pretty much all code changes, including refactorings1, need issues. Please see the devguide for more info :)

I'm sorry, I'm not hostile. Maybe I should bring a smile🙂

Footnotes

  1. this PR counts as refactoring

@erlend-aasland
Copy link
Contributor

I'm sorry, I'm not hostile. Maybe I should bring a smile

It often helps to use more friendly words. Instead of "I don't think this modification is meaningful", try instead to ask what the author intends to achieve with the change. @rruuaanng, see also https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants