Skip to content

Commit fb450fc

Browse files
committed
Spell out Abstract Syntax Tree the first time it appears in the document.
1 parent 17b8009 commit fb450fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

peps/pep-0750.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ in the output of the ``__iter__()`` method:
339339
.. code-block:: python
340340
341341
first = "Eat"
342-
second = "Roquefort"
342+
second = "Red Leicester"
343343
template = t"{first}{second}"
344344
contents = list(template)
345345
assert len(contents) == 2
346346
assert contents[0].value == "Eat"
347347
assert contents[0].expression == "first"
348-
assert contents[1].value == "Roquefort"
348+
assert contents[1].value == "Red Leicester"
349349
assert contents[1].expression == "second"
350350
351351
# However, the strings attribute contains empty strings:
@@ -833,9 +833,10 @@ in terms of formal grammars. Developers will need to learn how to work with the
833833
``strings`` and ``interpolation`` attributes of a ``Template`` instance and how
834834
to process interpolations in a context-sensitive fashion. More sophisticated
835835
grammars will likely require parsing to intermediate representations like an
836-
AST. Great template processing code will handle format specifiers and conversions
837-
when appropriate. Writing production-grade template processing code -- for
838-
instance, to support HTML templates -- can be a large undertaking.
836+
abstract syntax tree (AST). Great template processing code will handle format
837+
specifiers and conversions when appropriate. Writing production-grade template
838+
processing code -- for instance, to support HTML templates -- can be a large
839+
undertaking.
839840

840841
We expect that template strings will provide framework authors with a powerful
841842
new tool in their toolbox. While the functionality of template strings overlaps

0 commit comments

Comments
 (0)