[Python-checkins] CVS: python/dist/src/Doc/api api.tex,1.103,1.104
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 19 Jan 2001 14:48:36 -0800
Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv17671/api
Modified Files:
api.tex
Log Message:
Fixed a bunch of typos caught by Gilles Civario.
Index: api.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/api.tex,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -r1.103 -r1.104
*** api.tex 2001/01/17 18:04:31 1.103
--- api.tex 2001/01/19 22:48:33 1.104
***************
*** 889,893 ****
This function sets the error indicator. \var{exception} should be a
Python exception (string or class, not an instance).
! \var{fmt} should be a string, containing format codes, similar to
\cfunction{printf}. The \code{width.precision} before a format code
is parsed, but the width part is ignored.
--- 889,893 ----
This function sets the error indicator. \var{exception} should be a
Python exception (string or class, not an instance).
! \var{format} should be a string, containing format codes, similar to
\cfunction{printf}. The \code{width.precision} before a format code
is parsed, but the width part is ignored.
***************
*** 948,952 ****
\begin{cfuncdesc}{int}{PyErr_Warn}{PyObject *category, char *message}
Issue a warning message. The \var{category} argument is a warning
! category (see below) or NULL; the \var{message} argument is a message
string.
--- 948,952 ----
\begin{cfuncdesc}{int}{PyErr_Warn}{PyObject *category, char *message}
Issue a warning message. The \var{category} argument is a warning
! category (see below) or \NULL; the \var{message} argument is a message
string.
***************
*** 961,966 ****
warning message is actually printed, nor what the reason is for the
exception; this is intentional.) If an exception is raised, the
! caller should do its normal exception handling (e.g. DECREF owned
! references and return an error value).
Warning categories must be subclasses of \cdata{Warning}; the default
--- 961,967 ----
warning message is actually printed, nor what the reason is for the
exception; this is intentional.) If an exception is raised, the
! caller should do its normal exception handling
! (e.g. \cfunction{Py_DECREF()} owned references and return an error
! value).
Warning categories must be subclasses of \cdata{Warning}; the default
***************
*** 1105,1109 ****
which \samp{isatty(fileno(\var{fp}))} is true. If the global flag
\cdata{Py_InteractiveFlag} is true, this function also returns true if
! the \var{name} pointer is \NULL{} or if the name is equal to one of
the strings \code{'<stdin>'} or \code{'???'}.
\end{cfuncdesc}
--- 1106,1110 ----
which \samp{isatty(fileno(\var{fp}))} is true. If the global flag
\cdata{Py_InteractiveFlag} is true, this function also returns true if
! the \var{filename} pointer is \NULL{} or if the name is equal to one of
the strings \code{'<stdin>'} or \code{'???'}.
\end{cfuncdesc}
***************
*** 1498,1506 ****
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{o}, \var{args})}.
\bifuncindex{apply}
\end{cfuncdesc}
! \begin{cfuncdesc}{PyObject*}{PyObject_CallFunction}{PyObject *callable_object, char *format, ...}
Call a callable Python object \var{callable_object}, with a
variable number of C arguments. The C arguments are described
--- 1499,1508 ----
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}
! \begin{cfuncdesc}{PyObject*}{PyObject_CallFunction}{PyObject *callable_object,
! char *format, ...}
Call a callable Python object \var{callable_object}, with a
variable number of C arguments. The C arguments are described
***************
*** 1508,1517 ****
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{o},
\var{args})}.\bifuncindex{apply}
\end{cfuncdesc}
! \begin{cfuncdesc}{PyObject*}{PyObject_CallMethod}{PyObject *o, char *m, char *format, ...}
Call the method named \var{m} of object \var{o} with a variable number
of C arguments. The C arguments are described by a
--- 1510,1520 ----
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}
! \begin{cfuncdesc}{PyObject*}{PyObject_CallMethod}{PyObject *o,
! char *method, char *format, ...}
Call the method named \var{m} of object \var{o} with a variable number
of C arguments. The C arguments are described by a
***************
*** 1688,1692 ****
Returns the ``bitwise and'' of \var{o2} and \var{o2} on success and
\NULL{} on failure. This is the equivalent of the Python expression
! \samp{\var{o1} \& \var{o2}}.
\end{cfuncdesc}
--- 1691,1695 ----
Returns the ``bitwise and'' of \var{o2} and \var{o2} on success and
\NULL{} on failure. This is the equivalent of the Python expression
! \samp{\var{o1} \&\ \var{o2}}.
\end{cfuncdesc}
***************
*** 1746,1750 ****
supports it. This is the equivalent of the Python expression \samp{\var{o1}
**= \var{o2}} when o3 is \cdata{Py_None}, or an in-place variant of
! \samp{pow(\var{o1}, \var{o2}, var{o3})} otherwise. If \var{o3} is to be
ignored, pass \cdata{Py_None} in its place (passing \NULL{} for \var{o3}
would cause an illegal memory access).
--- 1749,1753 ----
supports it. This is the equivalent of the Python expression \samp{\var{o1}
**= \var{o2}} when o3 is \cdata{Py_None}, or an in-place variant of
! \samp{pow(\var{o1}, \var{o2}, \var{o3})} otherwise. If \var{o3} is to be
ignored, pass \cdata{Py_None} in its place (passing \NULL{} for \var{o3}
would cause an illegal memory access).
***************
*** 1768,1775 ****
\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceAnd}{PyObject *o1, PyObject *o2}
! Returns the ``bitwise and'' of \var{o2} and \var{o2} on success
! and \NULL{} on failure. The operation is done \emph{in-place} when \var{o1}
! supports it. This is the equivalent of the Python expression \samp{\var{o1}
! \&= \var{o2}}.
\end{cfuncdesc}
--- 1771,1778 ----
\begin{cfuncdesc}{PyObject*}{PyNumber_InPlaceAnd}{PyObject *o1, PyObject *o2}
! Returns the ``bitwise and'' of \var{o1} and \var{o2} on success
! and \NULL{} on failure. The operation is done \emph{in-place} when
! \var{o1} supports it. This is the equivalent of the Python expression
! \samp{\var{o1} \&= \var{o2}}.
\end{cfuncdesc}
***************
*** 1884,1888 ****
\begin{cfuncdesc}{int}{PySequence_DelItem}{PyObject *o, int i}
! Delete the \var{i}th element of object \var{v}. Returns
\code{-1} on failure. This is the equivalent of the Python
statement \samp{del \var{o}[\var{i}]}.
--- 1887,1891 ----
\begin{cfuncdesc}{int}{PySequence_DelItem}{PyObject *o, int i}
! Delete the \var{i}th element of object \var{o}. Returns
\code{-1} on failure. This is the equivalent of the Python
statement \samp{del \var{o}[\var{i}]}.
***************
*** 2044,2048 ****
if you receive an object from a Python program and you are not sure
that it has the right type, you must perform a type check first;
! for example. to check that an object is a dictionary, use
\cfunction{PyDict_Check()}. The chapter is structured like the
``family tree'' of Python object types.
--- 2047,2051 ----
if you receive an object from a Python program and you are not sure
that it has the right type, you must perform a type check first;
! for example, to check that an object is a dictionary, use
\cfunction{PyDict_Check()}. The chapter is structured like the
``family tree'' of Python object types.