gh-138558: Improve description of Interpolation.expression in library docs#139187
gh-138558: Improve description of Interpolation.expression in library docs#139187AA-Turner merged 8 commits intopython:mainfrom
Interpolation.expression in library docs#139187Conversation
AA-Turner
left a comment
There was a problem hiding this comment.
Some suggestions -- these will need wrapping though, sorry, I'm on mobile.
A
Doc/library/string.templatelib.rst
Outdated
| should either set this to an empty string or choose a suitable valid | ||
| Python expression. | ||
| For interpolations created from t-string literals, :attr:`!expression` | ||
| is the source text found inside the curly braces, including any |
There was a problem hiding this comment.
| is the source text found inside the curly braces, including any | |
| is the source text found inside the curly brackets (``{`` & ``}``), including any |
There was a problem hiding this comment.
Aren't they "curly braces", not "brackets"?
(Or is there some python doc standard here?)
There was a problem hiding this comment.
Update: haha, I checked, and it looks like there's no consistency even in the Python docs.
Here's a google search for "curly braces" in Python docs vs same search for "curly brackets"
Top Google hit for "curly braces" in the docs is inside Format String Syntax
Top Google hit for "curly brackets" in the docs is in the index itself
Happy to go either way here! 🤷🏻♂️
Doc/library/string.templatelib.rst
Outdated
| Python expression. | ||
| For interpolations created from t-string literals, :attr:`!expression` | ||
| is the source text found inside the curly braces, including any | ||
| whitespace, but excluding the curly braces themselves. For manually |
There was a problem hiding this comment.
| whitespace, but excluding the curly braces themselves. For manually | |
| whitespace, but excluding the curly brackets themselves. For manually |
Co-authored-by: Adam Turner <[email protected]>
…nto interpolation-doc-fix
Thanks! Applied all of them but waiting for your final input on "curly braces" vs "curly brackets" since the docs seem inconsistent on this. |
|
@AA-Turner This is the other one I'm hoping we merge in time for 3.14.0 final -- I've applied all your changes but waiting on your final input on curly braces vs brackets. Thanks! :-) |
|
@davepeck Did you see my earlier comment? I hadn't realiased anything was still waiting on me, sorry. |
Oh sheesh, no, somehow I missed it. Sorry about that! @AA-Turner Just changed all |
|
Thanks @davepeck for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…ythonGH-139187) (cherry picked from commit 880c952) Co-authored-by: Dave Peck <[email protected]> Co-authored-by: Adam Turner <[email protected]>
|
GH-139579 is a backport of this pull request to the 3.14 branch. |
…GH-139187) (#139579) gh-138558: Improve description of ``Interpolation.expression`` (GH-139187) (cherry picked from commit 880c952) Co-authored-by: Dave Peck <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…ython#139187) Co-authored-by: Adam Turner <[email protected]>
Improve the description of
Interpolation.expressionto clarify exactly what it is set to, and when.This is in response to Jelle's comment in this related issue.
📚 Documentation preview 📚: https://cpython-previews--139187.org.readthedocs.build/