[Python-checkins] python/dist/src/Doc/api abstract.tex,1.8.6.7,1.8.6.8
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
2002年12月06日 02:17:38 -0800
Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1:/tmp/cvs-serv3621/Doc/api
Modified Files:
Tag: release22-maint
abstract.tex
Log Message:
Backport version 1.21:
Document that the second argument to PyObject_IsInstance
may be a tuple. This closes SF patch
http://www.python.org/sf/649095
Index: abstract.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v
retrieving revision 1.8.6.7
retrieving revision 1.8.6.8
diff -C2 -d -r1.8.6.7 -r1.8.6.8
*** abstract.tex 8 Sep 2002 04:42:16 -0000 1.8.6.7
--- abstract.tex 6 Dec 2002 10:17:35 -0000 1.8.6.8
***************
*** 172,184 ****
\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.
\versionadded{2.1}
\end{cfuncdesc}
--- 172,189 ----
\begin{cfuncdesc}{int}{PyObject_IsInstance}{PyObject *inst, PyObject *cls}
! 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{cls}
! is a tuple, the check will be done against every entry in \var{cls}.
! The result will be \code{1} when at least one of the checks returns
! \code{1}, otherwise it will be \code{0}. If \var{inst} is not a class
! instance and \var{cls} is neither a type object, nor a class object,
! nor a tuple, \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}
+ \versionchanged[Support for a tuple as the second argument added]{2.2}
\end{cfuncdesc}