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-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b74cf54a647d8038c7fd40effe6049570a03818b;p=python 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 22f7dd0ff6..957cccf82c 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -71,6 +71,11 @@ Type Objects .. versionadded:: 2.2 + 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)