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

Replacing %-formatting and string concatenation with f-strings in platform module #94713

Closed
Nougat-Waffle opened this issue Jul 9, 2022 · 1 comment
Labels
type-feature A feature request or enhancement

Comments

@Nougat-Waffle
Copy link
Contributor

A simple rewriting of some of the code to be more modern. Replacing %-formatting and string concatenation with f-strings and replacing while 1 with while True.

@Nougat-Waffle Nougat-Waffle added the type-feature A feature request or enhancement label Jul 9, 2022
@Nougat-Waffle Nougat-Waffle changed the title Replacing %-formatting and string concatenation with f-strings Replacing %-formatting and string concatenation with f-strings in platform module Jul 9, 2022
@stevendaprano
Copy link
Member

We don't make a habit of re-writing working code just for the sake of re-writing it. %-formatting works, and is usually faster than "more modern" formatting, so that would be code churn that makes the code worse rather than better.

Since this is just a cosmetic change that will probably hurt performance, I'm going to close this. If you benchmark the changes and find that they are significantly faster, feel free to reopen.

@stevendaprano stevendaprano closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants