[Python-checkins] python/dist/src/Doc/api concrete.tex,1.39,1.40
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Tue Jun 1 11:22:43 EDT 2004
Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11725/Doc/api
Modified Files:
concrete.tex
Log Message:
Patch #957398: Add public API for Generator Object/Type.
Index: concrete.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** concrete.tex 25 Mar 2004 08:51:22 -0000 1.39
--- concrete.tex 1 Jun 2004 15:22:40 -0000 1.40
***************
*** 2604,2605 ****
--- 2604,2636 ----
\var{cell} must be non-\NULL{} and must be a cell object.
\end{cfuncdesc}
+
+
+ \subsection{Generator Objects \label{gen-objects}}
+
+ Generator objects are what Python uses to implement generator iterators.
+ They are normally created by iterating over a function that yields values,
+ rather than explicitly calling \cfunction{PyGen_New}.
+
+ \begin{ctypedesc}{PyGenObject}
+ The C structure used for generator objects.
+ \end{ctypedesc}
+
+ \begin{cvardesc}{PyTypeObject}{PyGen_Type}
+ The type object corresponding to generator objects
+ \end{cvardesc}
+
+ \begin{cfuncdesc}{int}{PyGen_Check}{ob}
+ Return true if \var{ob} is a generator object; \var{ob} must not be
+ \NULL.
+ \end{cfuncdesc}
+
+ \begin{cfuncdesc}{int}{PyGen_CheckExact}{ob}
+ Return true if \var{ob}'s type is \var{PyGen_Type}
+ is a generator object; \var{ob} must not be
+ \NULL.
+ \end{cfuncdesc}
+
+ \begin{cfuncdesc}{PyObject*}{PyGen_New}{PyFrameObject *frame}
+ Create and return a new generator object based on the \var{frame} object.
+ The parameter must not be \NULL.
+ \end{cfuncdesc}
More information about the Python-checkins
mailing list