Skip to content

Commit 17b8009

Browse files
davepeckAA-Turner
andauthored
Apply suggestions from code review
Apply several of @AA-Turner's suggestions. Will address the remaining separately. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 90ef017 commit 17b8009

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

peps/pep-0750.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Template String Literals
109109

110110
This PEP introduces a new string prefix, ``t``, to define template string literals.
111111
These literals resolve to a new type, ``Template``, found in the standard library
112-
module ``string.templatelib``.
112+
module :mod:`!string.templatelib`.
113113

114114
The following code creates a ``Template`` instance:
115115

@@ -135,7 +135,7 @@ The ``Template`` Type
135135
---------------------
136136

137137
Template 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

195195
The ``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
454454
to how it behaves in f-strings, though due to limitations of the implementation
455455
there 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

474474
Raw Template Strings

0 commit comments

Comments
 (0)