summaryrefslogtreecommitdiffstats
path: root/Doc/api
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-15 20:51:19 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-15 20:51:19 (GMT)
commit0e0b6180ba2f85d54bdaeb4c36aac8bb01dd1759 (patch)
tree4f23d349ca28ca168d3fbff7fca0926e04c115ac /Doc/api
parent34adb8a8ec035afef6bbef0607ad48ed0973f838 (diff)
downloadcpython-0e0b6180ba2f85d54bdaeb4c36aac8bb01dd1759.zip
cpython-0e0b6180ba2f85d54bdaeb4c36aac8bb01dd1759.tar.gz
cpython-0e0b6180ba2f85d54bdaeb4c36aac8bb01dd1759.tar.bz2
Add documentation for PyObject_Call().
Note that PyObject_Size() is a synonym for PyObject_Length(). This closes SF patch #544330 (contributed by Thomas Heller).
Diffstat (limited to 'Doc/api')
-rw-r--r--Doc/api/abstract.tex16
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex
index 07d6592..f4ed06f 100644
--- a/Doc/api/abstract.tex
+++ b/Doc/api/abstract.tex
@@ -172,6 +172,21 @@ determination.
\end{cfuncdesc}
+\begin{cfuncdesc}{PyObject*}{PyObject_Call}{PyObject *callable_object,
+ PyObject *args,
+ PyObject *kw}
+ Call a callable Python object \var{callable_object}, with arguments
+ given by the tuple \var{args}, and named arguments given by the
+ dictionary \var{kw}. If no named arguments are needed, \var{kw} may
+ be \NULL{}. \var{args} must not be \NULL{}, use an empty tuple if
+ no arguments are needed. 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}, \var{kw})}
+ or \samp{\var{callable_object}(*\var{args}, **\var{kw})}.
+ \bifuncindex{apply}
+\end{cfuncdesc}
+
+
\begin{cfuncdesc}{PyObject*}{PyObject_CallObject}{PyObject *callable_object,
PyObject *args}
Call a callable Python object \var{callable_object}, with arguments
@@ -261,6 +276,7 @@ determination.
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_Length}{PyObject *o}
+\cfuncline{int}{PyObject_Size}{PyObject *o}
Return the length of object \var{o}. If the object \var{o} provides
both sequence and mapping protocols, the sequence length is
returned. On error, \code{-1} is returned. This is the equivalent