summaryrefslogtreecommitdiffstats
path: root/Doc/api/abstract.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-04-23 18:15:44 (GMT)
committerFred Drake <fdrake@acm.org>2002-04-23 18:15:44 (GMT)
commitb957bc3dccdbb55fbc5fcd03ed0996ea385b2b9a (patch)
treea4167fd600481a4e9d7626aeff8d0e0f56d4af24 /Doc/api/abstract.tex
parent106c1a0e7a38f59191182069debd4eb7490f9bad (diff)
downloadcpython-b957bc3dccdbb55fbc5fcd03ed0996ea385b2b9a.zip
cpython-b957bc3dccdbb55fbc5fcd03ed0996ea385b2b9a.tar.gz
cpython-b957bc3dccdbb55fbc5fcd03ed0996ea385b2b9a.tar.bz2
Clarify the return value of PyObject_IsInstance().
Diffstat (limited to 'Doc/api/abstract.tex')
-rw-r--r--Doc/api/abstract.tex17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex
index f4ed06f..0e25afa 100644
--- a/Doc/api/abstract.tex
+++ b/Doc/api/abstract.tex
@@ -129,14 +129,15 @@ for which they do not apply, they will raise a Python exception.
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyObject_IsInstance}{PyObject *inst, PyObject *cls}
- Return \code{1} if \var{inst} is an instance of the class \var{cls}
- or a subclass of \var{cls}. If \var{cls} is a type object rather
- than a class object, \cfunction{PyObject_IsInstance()} returns
- \code{1} if \var{inst} is of type \var{cls}. If \var{inst} is not a
- class instance and \var{cls} is neither a type object or class
- object, \var{inst} must have a \member{__class__} attribute --- the
- class relationship of the value of that attribute with \var{cls}
- will be used to determine the result of this function.
+ Returns \code{1} if \var{inst} is an instance of the class \var{cls}
+ or a subclass of \var{cls}, or \code{0} if not. On error, returns
+ \code{-1} and sets an exception. If \var{cls} is a type object
+ rather than a class object, \cfunction{PyObject_IsInstance()}
+ returns \code{1} if \var{inst} is of type \var{cls}. If \var{inst}
+ is not a class instance and \var{cls} is neither a type object or
+ class object, \var{inst} must have a \member{__class__} attribute
+ --- the class relationship of the value of that attribute with
+ \var{cls} will be used to determine the result of this function.
\versionadded{2.1}
\end{cfuncdesc}