@@ -888,7 +888,7 @@ \chapter{Exception Handling \label{exceptionHandling}}
888888 const char *format, \moreargs }
889889This function sets the error indicator. \var {exception} should be a
890890Python exception (string or class, not an instance).
891- \var {fmt } should be a string, containing format codes, similar to
891+ \var {format } should be a string, containing format codes, similar to
892892\cfunction {printf}. The \code {width.precision} before a format code
893893is parsed, but the width part is ignored.
894894
@@ -947,7 +947,7 @@ \chapter{Exception Handling \label{exceptionHandling}}
947947
948948\begin {cfuncdesc }{int}{PyErr_Warn}{PyObject *category, char *message}
949949Issue a warning message. The \var {category} argument is a warning
950- category (see below) or NULL; the \var {message} argument is a message
950+ category (see below) or \ NULL ; the \var {message} argument is a message
951951string.
952952
953953This function normally prints a warning message to \var {sys.stderr};
@@ -960,8 +960,9 @@ \chapter{Exception Handling \label{exceptionHandling}}
960960an exception is raised. (It is not possible to determine whether a
961961warning message is actually printed, nor what the reason is for the
962962exception; this is intentional.) If an exception is raised, the
963- caller should do its normal exception handling (e.g. DECREF owned
964- references and return an error value).
963+ caller should do its normal exception handling
964+ (e.g. \cfunction {Py_DECREF()} owned references and return an error
965+ value).
965966
966967Warning categories must be subclasses of \cdata {Warning}; the default
967968warning category is \cdata {RuntimeWarning}. The standard Python
@@ -1104,7 +1105,7 @@ \section{OS Utilities \label{os}}
11041105\var {filename} is deemed interactive. This is the case for files for
11051106which \samp {isatty(fileno(\var {fp}))} is true. If the global flag
11061107\cdata {Py_InteractiveFlag} is true, this function also returns true if
1107- the \var {name } pointer is \NULL {} or if the name is equal to one of
1108+ the \var {filename } pointer is \NULL {} or if the name is equal to one of
11081109the strings \code {'<stdin>'} or \code {'???'}.
11091110\end {cfuncdesc }
11101111
@@ -1497,22 +1498,24 @@ \section{Object Protocol \label{object}}
14971498arguments given by the tuple \var {args}. If no arguments are
14981499needed, then \var {args} may be \NULL {}. Returns the result of the
14991500call on success, or \NULL {} on failure. This is the equivalent
1500- of the Python expression \samp {apply(\var {o }, \var {args})}.
1501+ of the Python expression \samp {apply(\var {callable_object }, \var {args})}.
15011502\bifuncindex {apply}
15021503\end {cfuncdesc }
15031504
1504- \begin {cfuncdesc }{PyObject*}{PyObject_CallFunction}{PyObject *callable_object, char *format, ...}
1505+ \begin {cfuncdesc }{PyObject*}{PyObject_CallFunction}{PyObject *callable_object,
1506+ char *format, ...}
15051507Call a callable Python object \var {callable_object}, with a
15061508variable number of C arguments. The C arguments are described
15071509using a \cfunction {Py_BuildValue()} style format string. The format may
15081510be \NULL {}, indicating that no arguments are provided. Returns the
15091511result of the call on success, or \NULL {} on failure. This is
1510- the equivalent of the Python expression \samp {apply(\var {o },
1512+ the equivalent of the Python expression \samp {apply(\var {callable_object },
15111513\var {args})}.\bifuncindex {apply}
15121514\end {cfuncdesc }
15131515
15141516
1515- \begin {cfuncdesc }{PyObject*}{PyObject_CallMethod}{PyObject *o, char *m, char *format, ...}
1517+ \begin {cfuncdesc }{PyObject*}{PyObject_CallMethod}{PyObject *o,
1518+ char *method, char *format, ...}
15161519Call the method named \var {m} of object \var {o} with a variable number
15171520of C arguments. The C arguments are described by a
15181521\cfunction {Py_BuildValue()} format string. The format may be \NULL {},
@@ -1687,7 +1690,7 @@ \section{Number Protocol \label{number}}
16871690\begin {cfuncdesc }{PyObject*}{PyNumber_And}{PyObject *o1, PyObject *o2}
16881691Returns the `` bitwise and'' of \var {o2} and \var {o2} on success and
16891692\NULL {} on failure. This is the equivalent of the Python expression
1690- \samp {\var {o1} \& \var {o2}}.
1693+ \samp {\var {o1} \&\ \var {o2}}.
16911694\end {cfuncdesc }
16921695
16931696
@@ -1745,7 +1748,7 @@ \section{Number Protocol \label{number}}
17451748\NULL {} on failure. The operation is done \emph {in-place } when \var {o1}
17461749supports it. This is the equivalent of the Python expression \samp {\var {o1}
17471750**= \var {o2}} when o3 is \cdata {Py_None}, or an in-place variant of
1748- \samp {pow(\var {o1}, \var {o2}, var{o3})} otherwise. If \var {o3} is to be
1751+ \samp {pow(\var {o1}, \var {o2}, \ var {o3})} otherwise. If \var {o3} is to be
17491752ignored, pass \cdata {Py_None} in its place (passing \NULL {} for \var {o3}
17501753would cause an illegal memory access).
17511754\end {cfuncdesc }
@@ -1767,10 +1770,10 @@ \section{Number Protocol \label{number}}
17671770
17681771
17691772\begin {cfuncdesc }{PyObject*}{PyNumber_InPlaceAnd}{PyObject *o1, PyObject *o2}
1770- Returns the `` bitwise and'' of \var {o2 } and \var {o2} on success
1771- and \NULL {} on failure. The operation is done \emph {in-place } when \var {o1}
1772- supports it. This is the equivalent of the Python expression \samp { \var {o1}
1773- \& = \var {o2}}.
1773+ Returns the `` bitwise and'' of \var {o1 } and \var {o2} on success
1774+ and \NULL {} on failure. The operation is done \emph {in-place } when
1775+ \var {o1} supports it. This is the equivalent of the Python expression
1776+ \samp { \var {o1} \ & = \var {o2}}.
17741777\end {cfuncdesc }
17751778
17761779
@@ -1883,7 +1886,7 @@ \section{Sequence Protocol \label{sequence}}
18831886\end {cfuncdesc }
18841887
18851888\begin {cfuncdesc }{int}{PySequence_DelItem}{PyObject *o, int i}
1886- Delete the \var {i}th element of object \var {v }. Returns
1889+ Delete the \var {i}th element of object \var {o }. Returns
18871890\code {-1} on failure. This is the equivalent of the Python
18881891statement \samp {del \var {o}[\var {i}]}.
18891892\end {cfuncdesc }
@@ -2043,7 +2046,7 @@ \chapter{Concrete Objects Layer \label{concrete}}
20432046types. Passing them an object of the wrong type is not a good idea;
20442047if you receive an object from a Python program and you are not sure
20452048that it has the right type, you must perform a type check first;
2046- for example. to check that an object is a dictionary, use
2049+ for example, to check that an object is a dictionary, use
20472050\cfunction {PyDict_Check()}. The chapter is structured like the
20482051`` family tree'' of Python object types.
20492052
0 commit comments