Skip to content

Commit 9d28d79

Browse files
committed
attempt to clarify some wording in 'How to Teach This'
1 parent ef1f9d1 commit 9d28d79

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

peps/pep-0798.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,16 @@ expressions that involve unpacking::
580580
yield from expr
581581
g = generator()
582582

583-
We can then generalize from these specific examples to the idea that,
584-
wherever a non-starred comprehension/genexp would use an operator that
585-
adds a single element to a collection, the starred would instead use
586-
an operator that adds multiple elements to that collection.
583+
We can then generalize from these specific examples to the idea that, wherever
584+
a non-starred comprehension/genexp would use an operator that adds a single
585+
element to a collection, the starred would instead use an operator that adds
586+
multiple elements to that collection.
587587

588588
Alternatively, we don't need to think of the two ideas as separate; instead,
589589
with the new syntax, we can think of ``out = [...x... for x in it]`` as
590-
equivalent to the following code [#pep798-guido]_, regardless of whether or not
591-
``...x...`` uses ``*``::
590+
equivalent to the following code [#pep798-guido]_ (where ``...x...`` is a
591+
stand-in for an arbitrary expression), regardless of whether or not ``...x...``
592+
uses ``*``::
592593

593594
out = []
594595
for x in it:

0 commit comments

Comments
 (0)