-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
We should write the offical document for https://docs.python.org/3/library/
- Document
string.templatelibin the Library reference section - Find all mentions of f-strings in the current documentation and decide whether there should also be a reference to t-strings
- Add AST nodes to the
astdocs - Glossary
- Add new t-string roles to
lexical-analysis.rstsection with the_f-stringsrole and make sure it covers t-strings appropriately. - Lexical analysis, adjust f-strings section (probably keep one section and talk about f-string and t-string syntax in it, since it's so closely tied)
- Add
BUILD_INTERPOLATIONandBUILD_TEMPLATEto thedisdocs, probably somewhere nearBUILD_TUPLE - Lexical analysis, adjust String and Bytes literals section (Pending changes in this PR by @encukou .)
- Update the
Template stringssection ofDoc/library/string.rstto clarify that this is unrelated to t-strings (it's $-strings) - A section after the f-strings part of the tutorial where perhaps we show writing a function. I'm 50-50 on this (the cookbook might be enough.)
This can be a follow-on PR, but probably shouldn't be part of the first PR?:
- Consider building a "Python string formatting cookbook" that explains when you might use each of Python's increasingly many formatting features. (One question we got asked a lot at PyCon was: "are f-strings deprecated"?)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo