Skip to content
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

gh-94713 - Replacing while 1 with while True #94714

Merged

Conversation

Nougat-Waffle
Copy link
Contributor

@Nougat-Waffle Nougat-Waffle commented Jul 9, 2022

gh-94713: Replacing %-formatting and string concatenation with f-strings and replacing while 1 with while True.

I don't think there is a need for a NEWS entry.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@Nougat-Waffle Nougat-Waffle changed the title Replacing %-formatting and string concatenation with f-strings in platform module gh-94713 - Replacing %-formatting and string concatenation with f-strings in platform module Jul 9, 2022
@ericvsmith
Copy link
Member

Typically we don't accept changes like this, due to the churn involved. Is there any reason these need to be f-strings?

@Nougat-Waffle
Copy link
Contributor Author

Typically we don't accept changes like this, due to the churn involved. Is there any reason these need to be f-strings?

These don't need to be f-strings. I just though that changing to f-strings would make the code better and so I did. Could u elaborate further on why changes like this aren't welcome ?

@ericvsmith
Copy link
Member

Could u elaborate further on why changes like this aren't welcome ?

There's always a chance for an error to be introduced in corner cases, and it makes any existing PRs difficult to apply.

I'd definitely be okay with the 1 -> True change, though.

@Nougat-Waffle
Copy link
Contributor Author

Nougat-Waffle commented Jul 12, 2022

I'd definitely be okay with the 1 -> True change, though.

Alright, I reverted back the f-strings changes.

Copy link
Contributor

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

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

Although the name of this PR should probably be updated.

@Nougat-Waffle Nougat-Waffle changed the title gh-94713 - Replacing %-formatting and string concatenation with f-strings in platform module gh-94713 - Replacing while 1 with while True Jul 12, 2022
@rhettinger rhettinger merged commit cceac5d into python:main Jul 13, 2022
@Nougat-Waffle Nougat-Waffle deleted the gh-94713/modernize-platform-code branch July 13, 2022 04:48
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.

5 participants