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
Remove explicit quotes around %r and {!r} #76338
Comments
It is common to use quotes around %s. If the formatted argument is a string this will produce a string in qoutes, that look as a string literal in Python and other programming languages or just as a quoted string in English. But if quotes surround %r this looks like error. If the argument is a string this will lead to doubling qoutes. If its repr is in the form <...>, the angular parenthesis serve a role of qoutes, and additional qoutes are not needed. PR 4582 removes qoutes around %r and {!r} in format strings. |
Ethan, I think you misunderstood Serhiy's proposal. |
Yup, I sure did. :/ Looks like a good change to me. Are these the only instances of quotes used with %r? |
Yes, these are the only instances of quotes used with %r or {!r}. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: