Skip to content

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

Merged
merged 1 commit into from
Jul 7, 2018

Conversation

akuchling
Copy link
Contributor

@akuchling akuchling commented Mar 9, 2018

Could be backported to 3.7 and 3.6 as well.

https://bugs.python.org/issue28626

Copy link
Contributor

@nceder nceder left a 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.

@nceder
Copy link
Contributor

nceder commented May 14, 2018

CC @vstinner

@akuchling
Copy link
Contributor Author

Shall I go ahead and merge this?

@vstinner
Copy link
Member

vstinner commented Jun 4, 2018

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 :-)

@akuchling akuchling merged commit ced350b into python:master Jul 7, 2018
@miss-islington
Copy link
Contributor

Thanks @akuchling for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@akuchling: Please replace # with GH- in the commit message next time. Thanks!

@bedevere-bot
Copy link

GH-8174 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 7, 2018
…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]>
miss-islington added a commit that referenced this pull request Jul 9, 2018
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants