Skip to content

Commit 8e860fa

Browse files
authored
Update compound_stmts.rst
1 parent 50f1e09 commit 8e860fa

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Doc/reference/compound_stmts.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,14 @@ The :keyword:`for` statement is used to iterate over the elements of a sequence
157157
for_stmt: "for" `target_list` "in" `starred_expression_list` ":" `suite`
158158
: ["else" ":" `suite`]
159159

160-
The expression following ``in`` is evaluated once; it should yield an
161-
:term:`iterable` object. An :term:`iterator` is created for that iterable. The
162-
first item provided by the iterator is then assigned to the target list using
163-
the standard rules for assignments (see :ref:`assignment`), and the suite is
164-
executed. This repeats for each item provided by the iterator. When the iterator
165-
is exhausted, the suite in the :keyword:`!else` clause, if present, is
166-
executed, and the loop terminates.
160+
The ``starred_expression_list`` expression is evaluated once; it should yield an
161+
:term:`iterable` object. An :term:`iterator` is created for that iterable.
162+
The first item provided
163+
by the iterator is then assigned to the target list using the standard
164+
rules for assignments (see :ref:`assignment`), and the suite is executed. This
165+
repeats for each item provided by the iterator. When the iterator is exhausted,
166+
the suite in the :keyword:`!else` clause,
167+
if present, is executed, and the loop terminates.
167168

168169
.. index::
169170
pair: statement; break

0 commit comments

Comments
 (0)