[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.134,1.135
Fred L. Drake
fdrake@users.sourceforge.net
2001年8月02日 11:00:31 -0700
Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv28489/api
Modified Files:
api.tex
Log Message:
Move away from apply() to using extended call syntax for some example
fragments when discussing equivalence of thhe C API to what a Python
programmer sees.
Added descriptions of PyEval_SetProfile() and PyEval_SetTrace().
Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -d -r1.134 -r1.135
*** api.tex 2001年07月20日 20:56:11 1.134
--- api.tex 2001年08月02日 18:00:28 1.135
***************
*** 1626,1630 ****
needed, then \var{args} may be \NULL{}. Returns the result of the
call on success, or \NULL{} on failure. This is the equivalent
! of the Python expression \samp{apply(\var{callable_object}, \var{args})}.
\bifuncindex{apply}
\end{cfuncdesc}
--- 1626,1631 ----
needed, then \var{args} may be \NULL{}. Returns the result of the
call on success, or \NULL{} on failure. This is the equivalent
! of the Python expression \samp{apply(\var{callable_object},
! \var{args})} or \samp{\var{callable_object}(*\var{args})}.
\bifuncindex{apply}
\end{cfuncdesc}
***************
*** 1637,1642 ****
be \NULL{}, indicating that no arguments are provided. Returns the
result of the call on success, or \NULL{} on failure. This is
! the equivalent of the Python expression \samp{apply(\var{callable_object},
! \var{args})}.\bifuncindex{apply}
\end{cfuncdesc}
--- 1638,1645 ----
be \NULL{}, indicating that no arguments are provided. Returns the
result of the call on success, or \NULL{} on failure. This is
! the equivalent of the Python expression
! \samp{apply(\var{callable_object}\var{args})} or
! \samp{\var{callable_object}(*\var{args})}.
! \bifuncindex{apply}
\end{cfuncdesc}
***************
*** 4783,4789 ****
--- 4786,4801 ----
\begin{cfuncdesc}{void}{PyEval_SetProfile}{Py_tracefunc func, PyObject *obj}
+ Set the profiler function to \var{func}. The \var{obj} parameter is
+ passed to the function as its first parameter, and may be any Python
+ object, or \NULL. If the profile function needs to maintain state,
+ using a different value for \var{obj} for each thread provides a
+ convenient and thread-safe place to store it. The profile function
+ is called for all monitored events except the line-number events.
\end{cfuncdesc}
\begin{cfuncdesc}{void}{PyEval_SetTrace}{Py_tracefunc func, PyObject *obj}
+ Set the the tracing function to \var{func}. This is similar to
+ \cfunction{PyEval_SetProfile()}, except the tracing function does
+ receive line-number events.
\end{cfuncdesc}
***************
*** 5278,5281 ****
--- 5290,5297 ----
(PyObject *self, int segment, const char **ptrptr)}
\end{ctypedesc}
+
+
+ \section{Supporting the Iterator Protocol
+ \label{supporting-iteration}}