[Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.45,1.46

Fred L. Drake fdrake@users.sourceforge.net
Tue, 11 Dec 2001 22:06:45 -0800


Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv10652/ref

Modified Files:
	ref6.tex 
Log Message:
Add a note about yield requiring a __future__ directive.

Index: ref6.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** ref6.tex	2001/12/11 21:58:35	1.45
--- ref6.tex	2001/12/12 06:06:43	1.46
***************
*** 483,486 ****
--- 483,496 ----
  get executed.
  
+ \note{In Python 2.2, the \keyword{yield} statement is only allowed
+ when the \code{generators} feature has been enabled.  It will always
+ be enabled in Python 2.3.  This \code{__future__} import statment can
+ be used to enable the feature:}
+ 
+ \begin{verbatim}
+ from __future__ import generators
+ \end{verbatim}
+ 
+ 
  \begin{seealso}
    \seepep{0255}{Simple Generators}