@@ -109,7 +109,7 @@ Template String Literals
109109
110110This PEP introduces a new string prefix, ``t ``, to define template string literals.
111111These literals resolve to a new type, ``Template ``, found in the standard library
112- module `` string.templatelib ` `.
112+ module :mod: ` ! string.templatelib `.
113113
114114The following code creates a ``Template `` instance:
115115
@@ -135,7 +135,7 @@ The ``Template`` Type
135135---------------------
136136
137137Template strings evaluate to an instance of a new immutable type,
138- `` string.templatelib.Template ` `:
138+ :class: ` ! string.templatelib.Template `:
139139
140140.. code-block :: python
141141
@@ -193,7 +193,7 @@ The ``Interpolation`` Type
193193--------------------------
194194
195195The ``Interpolation `` type represents an expression inside a template string.
196- Like ``Template ``, it is a new class found in the `` string.templatelib ` ` module:
196+ Like ``Template ``, it is a new class found in the :mod: ` ! string.templatelib ` module:
197197
198198.. code-block :: python
199199
@@ -454,7 +454,7 @@ The debug specifier, ``=``, is supported in template strings and behaves similar
454454to how it behaves in f-strings, though due to limitations of the implementation
455455there is a slight difference.
456456
457- In particular, ``t'{foo =}' `` is treated as ``t'foo={foo !r}' ``:
457+ In particular, ``t'{value =}' `` is treated as ``t'value={value !r}' ``:
458458
459459.. code-block :: python
460460
@@ -464,11 +464,11 @@ In particular, ``t'{foo=}'`` is treated as ``t'foo={foo!r}'``:
464464 assert template.interpolations[0 ].value == " World"
465465 assert template.interpolations[0 ].conversion == " r"
466466
467- If a separate format string is also provided, ``t'{foo =:fmt} `` is treated
468- instead as ``t'foo={foo !s:fmt}' ``.
467+ If a separate format string is also provided, ``t'{value =:fmt} `` is treated
468+ instead as ``t'value={value !s:fmt}' ``.
469469
470- Whitespace is preserved in the debug specifier, so ``t'{foo = }' `` is
471- treated as ``t'foo = {foo !r}' ``.
470+ Whitespace is preserved in the debug specifier, so ``t'{value = }' `` is
471+ treated as ``t'value = {value !r}' ``.
472472
473473
474474Raw Template Strings
0 commit comments