Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7fabaf83
Commit
7fabaf83
authored
Nov 02, 2004
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarify discussion of iteration in the section on the "for" statement
(SF bug #829073)
parent
303e30ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/ref/ref7.tex
Doc/ref/ref7.tex
+4
-2
No files found.
Doc/ref/ref7.tex
View file @
7fabaf83
...
...
@@ -134,8 +134,10 @@ sequence (such as a string, tuple or list) or other iterable object:
\productioncont
{
["else" ":"
\token
{
suite
}
]
}
\end{productionlist}
The expression list is evaluated once; it should yield a sequence. The
suite is then executed once for each item in the sequence, in the
The expression list is evaluated once; it should yield an iterable
object. An iterator is created for the result of the
{}
\code
{
expression
_
list
}
. The suite is then executed once for each
item provided by the iterator, in the
order of ascending indices. Each item in turn is assigned to the
target list using the standard rules for assignments, and then the
suite is executed. When the items are exhausted (which is immediately
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment