]> granicus.if.org Git - python/commitdiff
Document PyType_CheckExact(), PyType_IS_GC().
authorFred Drake <fdrake@acm.org>
Wed, 10 Apr 2002 17:52:52 +0000 (17:52 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 10 Apr 2002 17:52:52 +0000 (17:52 +0000)
Update description of PyType_Check().

Doc/api/concrete.tex

index 50405ffd2701d1f33a52f61267fafbaf0c2b92e3..fd8ac4a8d6e712d68ed891f73280ccf7513d494f 100644 (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}