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
4a4e3307
Commit
4a4e3307
authored
Dec 11, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up a sad sentence in the yield description.
parent
80771473
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/ref/ref6.tex
Doc/ref/ref6.tex
+5
-5
No files found.
Doc/ref/ref6.tex
View file @
4a4e3307
...
...
@@ -476,11 +476,11 @@ enough information is saved so that the next time \method{next()} is
invoked, the function can proceed exactly as if the
\keyword
{
yield
}
statement were just another external call.
One restriction in the use of the
\keyword
{
yield
}
statement is is that
is is not allowed in the try clause of a
\keyword
{
try
}
...
\ \keyword
{
finally
}
construct. The difficulty is that there's no
guarantee the generator will ever be resumed, hence no guarantee that
the
\keyword
{
finally
}
block will ever
get executed.
The
\keyword
{
yield
}
statement is not allowed in the
\keyword
{
try
}
clause of a
\keyword
{
try
}
...
\ \keyword
{
finally
}
construct. The
difficulty is that there's no guarantee the generator will ever be
resumed, hence no guarantee that the
\keyword
{
finally
}
block will ever
get executed.
\begin{seealso}
\seepep
{
0255
}{
Simple Generators
}
...
...
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