Document PyType_CheckExact(), PyType_IS_GC().

Update description of PyType_Check().
This commit is contained in:
Fred Drake 2002-04-10 17:52:52 +00:00
parent ce0b664af2
commit e3c764b6c2
1 changed files with 16 additions and 1 deletions

View File

@ -36,7 +36,16 @@ This section describes Python type objects and the singleton object
\end{cvardesc}
\begin{cfuncdesc}{int}{PyType_Check}{PyObject *o}
Returns true is the object \var{o} is a type object.
Returns true if the object \var{o} is a type object, including
instances of types derived from the standard type object. Returns
false in all other cases.
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyType_CheckExact}{PyObject *o}
Returns true if the object \var{o} is a type object, but not a
subtype of the standard type object. Returns false in all other
cases.
\versionadded{2.2}
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyType_HasFeature}{PyObject *o, int feature}
@ -44,6 +53,12 @@ This section describes Python type objects and the singleton object
\var{feature}. Type features are denoted by single bit flags.
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyType_IS_GC}{PyObject *o}
Return true if the type object includes support for the cycle
detector; this tests the type flag \constant{Py_TPFLAGS_HAVE_GC}.
\versionadded{2.0}
\end{cfuncdesc}
\begin{cfuncdesc}{int}{PyType_IsSubtype}{PyTypeObject *a, PyTypeObject *b}
Returns true if \var{a} is a subtype of \var{b}.
\versionadded{2.2}