-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-81039: Add small description of f-string's "=}" to tutorial #92291
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.
Hmm, is this the best example? The main use case for this feature is for debugging, and there doesn't really seem to be any debugging going on in this example.
Maybe something like
And this tutorial section could possibly also use an example for printing the curly brackets too
|
The last example you provided is very nice. I would split the example of showing |
It is a good example, except I'd make |
Thanks @slateny for the PR, and @ericvsmith for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
GH-96989 is a backport of this pull request to the 3.11 branch. |
…hongh-92291) (cherry picked from commit 4b81139) Co-authored-by: Stanley <[email protected]>
GH-96990 is a backport of this pull request to the 3.10 branch. |
…hongh-92291) (cherry picked from commit 4b81139) Co-authored-by: Stanley <[email protected]>
…gh-96990) (cherry picked from commit 4b81139) Co-authored-by: Stanley <[email protected]> Co-authored-by: Stanley <[email protected]>
…gh-96989) (cherry picked from commit 4b81139) Co-authored-by: Stanley <[email protected]> Co-authored-by: Stanley <[email protected]>
…gh-96989) (cherry picked from commit 4b81139) Co-authored-by: Stanley <[email protected]> Co-authored-by: Stanley <[email protected]>
#81039
https://docs.python.org/3/tutorial/inputoutput.html#formatted-string-literals
https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging