-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-28626: rearrange discussion of output formatting to encourage f-strings #6036
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this improves things in general, as well as adding explanation of f-strings.
CC @vstinner |
Shall I go ahead and merge this? |
I'm really sorry, I told @nceder that I will review this PR. I read it, but I'm not confortable to approve it. I'm not used to write documentation. @akuchling: If you are confident, sure, please go ahead :-) |
Thanks @akuchling for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
@akuchling: Please replace |
GH-8174 is a backport of this pull request to the 3.7 branch. |
…trings (pythonGH-6036) The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings. This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust(). (cherry picked from commit ced350b) Co-authored-by: Andrew Kuchling <[email protected]>
…trings (GH-6036) The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings. This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust(). (cherry picked from commit ced350b) Co-authored-by: Andrew Kuchling <[email protected]>
Could be backported to 3.7 and 3.6 as well.
https://bugs.python.org/issue28626