Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3c764b

Browse files
committed
Document PyType_CheckExact(), PyType_IS_GC().
Update description of PyType_Check().
1 parent ce0b664 commit e3c764b

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Doc/api/concrete.tex

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,29 @@ \subsection{Type Objects \label{typeObjects}}
3636
\end{cvardesc}
3737

3838
\begin{cfuncdesc}{int}{PyType_Check}{PyObject *o}
39-
Returns true is the object \var{o} is a type object.
39+
Returns true if the object \var{o} is a type object, including
40+
instances of types derived from the standard type object. Returns
41+
false in all other cases.
42+
\end{cfuncdesc}
43+
44+
\begin{cfuncdesc}{int}{PyType_CheckExact}{PyObject *o}
45+
Returns true if the object \var{o} is a type object, but not a
46+
subtype of the standard type object. Returns false in all other
47+
cases.
48+
\versionadded{2.2}
4049
\end{cfuncdesc}
4150

4251
\begin{cfuncdesc}{int}{PyType_HasFeature}{PyObject *o, int feature}
4352
Returns true if the type object \var{o} sets the feature
4453
\var{feature}. Type features are denoted by single bit flags.
4554
\end{cfuncdesc}
4655

56+
\begin{cfuncdesc}{int}{PyType_IS_GC}{PyObject *o}
57+
Return true if the type object includes support for the cycle
58+
detector; this tests the type flag \constant{Py_TPFLAGS_HAVE_GC}.
59+
\versionadded{2.0}
60+
\end{cfuncdesc}
61+
4762
\begin{cfuncdesc}{int}{PyType_IsSubtype}{PyTypeObject *a, PyTypeObject *b}
4863
Returns true if \var{a} is a subtype of \var{b}.
4964
\versionadded{2.2}

0 commit comments

Comments
 (0)