-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Confusing string formatting examples #52802
Comments
I was going through the string formatting examples this evening and noticed this: print '%(language)s has %(#)03d quote types.' % \ The example uses a '#' as a map key. This is somewhat misleading as if we had simply left the parenthesis off, the '#' would have been interpreted as an alternate conversion flag. Should be updated to use a more verbose (and less confusing) dictionary key. |
Thanks for the suggestion. Two things:
Regards |
Attaching a patch against the trunk, unified format, changed to 'number' as per suggestion. |
Looks good to me. |
Committed in r85609. |
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: