Clean up a sad sentence in the yield description.
This commit is contained in:
parent
c3baa0eff7
commit
3a8e59ebe1
|
@ -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}
|
invoked, the function can proceed exactly as if the \keyword{yield}
|
||||||
statement were just another external call.
|
statement were just another external call.
|
||||||
|
|
||||||
One restriction in the use of the \keyword{yield} statement is is that
|
The \keyword{yield} statement is not allowed in the \keyword{try}
|
||||||
is is not allowed in the try clause of a \keyword{try}
|
clause of a \keyword{try} ...\ \keyword{finally} construct. The
|
||||||
...\ \keyword{finally} construct. The difficulty is that there's no
|
difficulty is that there's no guarantee the generator will ever be
|
||||||
guarantee the generator will ever be resumed, hence no guarantee that
|
resumed, hence no guarantee that the \keyword{finally} block will ever
|
||||||
the \keyword{finally} block will ever get executed.
|
get executed.
|
||||||
|
|
||||||
\begin{seealso}
|
\begin{seealso}
|
||||||
\seepep{0255}{Simple Generators}
|
\seepep{0255}{Simple Generators}
|
||||||
|
|
Loading…
Reference in New Issue