Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1529ef8 commit 8d0645cCopy full SHA for 8d0645c
1 file changed
Doc/ref/ref6.tex
@@ -482,6 +482,16 @@ \section{The \keyword{yield} statement \label{yield}}
482
resumed, hence no guarantee that the \keyword{finally} block will ever
483
get executed.
484
485
+\note{In Python 2.2, the \keyword{yield} statement is only allowed
486
+when the \code{generators} feature has been enabled. It will always
487
+be enabled in Python 2.3. This \code{__future__} import statment can
488
+be used to enable the feature:}
489
+
490
+\begin{verbatim}
491
+from __future__ import generators
492
+\end{verbatim}
493
494
495
\begin{seealso}
496
\seepep{0255}{Simple Generators}
497
{The proposal for adding generators and the \keyword{yield}
0 commit comments