From: Fred Drake Date: Wed, 10 Apr 2002 17:52:52 +0000 (+0000) Subject: Document PyType_CheckExact(), PyType_IS_GC(). X-Git-Tag: v2.3c1~6063 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3c764b6c288ff546e8b1c3513044c63558aad8b;p=python Document PyType_CheckExact(), PyType_IS_GC(). Update description of PyType_Check(). --- diff --git a/Doc/api/concrete.tex b/Doc/api/concrete.tex index 50405ffd27..fd8ac4a8d6 100644 --- a/Doc/api/concrete.tex +++ b/Doc/api/concrete.tex @@ -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}