summaryrefslogtreecommitdiffstats
path: root/Doc/api/api.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-01-19 22:48:33 (GMT)
committerFred Drake <fdrake@acm.org>2001-01-19 22:48:33 (GMT)
commit5566c1ce36138bb3e91e0dac4d6694cfbb68f206 (patch)
tree6303726be6f29ffdfbd12ab7cc9692a61b6537d9 /Doc/api/api.tex
parent0fe5af9b4d20b491717256d447248f64b854097d (diff)
downloadcpython-5566c1ce36138bb3e91e0dac4d6694cfbb68f206.zip
cpython-5566c1ce36138bb3e91e0dac4d6694cfbb68f206.tar.gz
cpython-5566c1ce36138bb3e91e0dac4d6694cfbb68f206.tar.bz2
Fixed a bunch of typos caught by Gilles Civario.
Diffstat (limited to 'Doc/api/api.tex')
-rw-r--r--Doc/api/api.tex37
1 files changed, 20 insertions, 17 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index b15c2d3..3d89adf 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -888,7 +888,7 @@ You need not increment its reference count.
const char *format, \moreargs}
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
+\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.
@@ -947,7 +947,7 @@ argument. It is mostly for internal use.
\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
+category (see below) or \NULL; the \var{message} argument is a message
string.
This function normally prints a warning message to \var{sys.stderr};
@@ -960,8 +960,9 @@ return value is \code{0} if no exception is raised, or \code{-1} if
an exception is raised. (It is not possible to determine whether a
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).
+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
warning category is \cdata{RuntimeWarning}. The standard Python
@@ -1104,7 +1105,7 @@ Return true (nonzero) if the standard I/O file \var{fp} with name
\var{filename} is deemed interactive. This is the case for files for
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 \var{filename} pointer is \NULL{} or if the name is equal to one of
the strings \code{'<stdin>'} or \code{'???'}.
\end{cfuncdesc}
@@ -1497,22 +1498,24 @@ Call a callable Python object \var{callable_object}, with
arguments given by the tuple \var{args}. If no arguments are
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})}.
+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, ...}
+\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
using a \cfunction{Py_BuildValue()} style format string. The format may
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},
+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 *m, char *format, ...}
+\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
\cfunction{Py_BuildValue()} format string. The format may be \NULL{},
@@ -1687,7 +1690,7 @@ expression \samp{\var{o1} >> \var{o2}}.
\begin{cfuncdesc}{PyObject*}{PyNumber_And}{PyObject *o1, PyObject *o2}
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}}.
+\samp{\var{o1} \&\ \var{o2}}.
\end{cfuncdesc}
@@ -1745,7 +1748,7 @@ See the built-in function \function{pow()}\bifuncindex{pow}. Returns
\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}} 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
+\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).
\end{cfuncdesc}
@@ -1767,10 +1770,10 @@ supports it. This is the equivalent of the Python expression \samp{\var{o1}
\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}}.
+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}
@@ -1883,7 +1886,7 @@ statement \samp{\var{o}[\var{i}] = \var{v}}.
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PySequence_DelItem}{PyObject *o, int i}
-Delete the \var{i}th element of object \var{v}. Returns
+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}]}.
\end{cfuncdesc}
@@ -2043,7 +2046,7 @@ The functions in this chapter are specific to certain Python object
types. Passing them an object of the wrong type is not a good idea;
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
+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.