From: Georg Brandl Date: Mon, 6 Oct 2014 12:15:06 +0000 (+0200) Subject: Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__. X-Git-Tag: v3.4.3rc1~544 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a920b6d76251068281d3f44b7978bda4658bc986;p=thirdparty%2FPython%2Fcpython.git Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__. --- diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index 8dc040b85201..343437d676d7 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -44,6 +44,7 @@ Type Objects .. versionadded:: 3.2 + .. c:function:: void PyType_Modified(PyTypeObject *type) Invalidate the internal lookup cache for the type and all of its @@ -67,6 +68,11 @@ Type Objects Return true if *a* is a subtype of *b*. + This function only checks for actual subtypes, which means that + :meth:`~type.__subclasscheck__` is not called on *b*. Call + :c:func:`PyObject_IsSubclass` to do the same check that :func:`issubclass` + would do. + .. c:function:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)