@@ -547,8 +547,8 @@ \section{Calling Python Functions from C
547547\constant {METH_VARARGS} flag; this is described in section
548548\ref {methodTable }, `` The Module's Method Table and Initialization
549549Function.'' The \cfunction {PyArg_ParseTuple()} function and its
550- arguments are documented in section \ref {parseTuple }, `` Format Strings
551- for \cfunction {PyArg_ParseTuple()} .''
550+ arguments are documented in section \ref {parseTuple }, `` Extracting
551+ Parameters in Extension Functions .''
552552
553553The macros \cfunction {Py_XINCREF()} and \cfunction {Py_XDECREF()}
554554increment/decrement the reference count of an object and are safe in
@@ -651,7 +651,8 @@ \section{Extracting Parameters in Extension Functions
651651remaining arguments must be addresses of variables whose type is
652652determined by the format string. For the conversion to succeed, the
653653\var {arg} object must match the format and the format must be
654- exhausted.
654+ exhausted. On success, \cfunction {PyArg_ParseTuple()} returns true,
655+ otherwise it returns false and raises an appropriate exception.
655656
656657Note that while \cfunction {PyArg_ParseTuple()} checks that the Python
657658arguments have the required types, it cannot check the validity of the
@@ -986,10 +987,12 @@ \section{Keyword Parameters for Extension Functions
986987
987988The \var {arg} and \var {format} parameters are identical to those of the
988989\cfunction {PyArg_ParseTuple()} function. The \var {kwdict} parameter
989- is the dictionary of keywords received as the third parameter from the
990+ is the dictionary of keywords received as the third parameter from the
990991Python runtime. The \var {kwlist} parameter is a \NULL {}-terminated
991992list of strings which identify the parameters; the names are matched
992- with the type information from \var {format} from left to right.
993+ with the type information from \var {format} from left to right. On
994+ success, \cfunction {PyArg_ParseTupleAndKeywords()} returns true,
995+ otherwise it returns false and raises an appropriate exception.
993996
994997\strong {Note:} Nested tuples cannot be parsed when using keyword
995998arguments! Keyword parameters passed in which are not present in the
0 commit comments