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

use f-strings to simplify the code #3579

Closed
totaam opened this issue Jul 15, 2022 · 1 comment
Closed

use f-strings to simplify the code #3579

totaam opened this issue Jul 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@totaam
Copy link
Collaborator

totaam commented Jul 15, 2022

I had not realized that f-strings were included in Python 3.6

This can make the code more readable (started in 4c3f0af)

Only to be used in places where the extra cost of evaluating the logging statement won't affect performance.
(some debug statements rarely get printed and should continue to only be evaluated when they are actually used)

@totaam totaam added the enhancement New feature or request label Jul 15, 2022
totaam added a commit that referenced this issue Jul 15, 2022
@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2022

This will do for now.

One small downside is that it can be harder to grep before {VARNAME} after than before %s after.

@totaam totaam closed this as completed Jul 16, 2022
totaam added a commit that referenced this issue Jul 17, 2022
totaam added a commit that referenced this issue Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant