gh-81039: Add small description of f-string's "=}" to tutorial#92291
Conversation
AlexWaygood
left a comment
There was a problem hiding this comment.
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 <46876382+slateny@users.noreply.github.com>
|
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 <46876382+slateny@users.noreply.github.com>
#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