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: v2.7.9rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b74cf54a647d8038c7fd40effe6049570a03818b;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 22f7dd0ff6c2..957cccf82cb7 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)