Skip to content

Write the official cpython documentation for t-strings #2

Open
@koxudaxi

Description

@koxudaxi

We should write the offical document for https://docs.python.org/3/library/

  • Document string.templatelib in 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 ast docs
  • Glossary
  • Lexical analysis, adjust String and Bytes literals section
  • 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_INTERPOLATION and BUILD_TEMPLATE to the dis docs, probably somewhere near BUILD_TUPLE
  • 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"?)
  • Update the Template strings section of Doc/library/string.rst to clarify that this is unrelated to t-strings (it's $-strings)
  • Add new t-string roles to lexical-analysis.rst section with the _f-strings role and make sure it covers t-strings appropriately.
  • 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.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions