]> granicus.if.org Git - python/commitdiff
Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__.
authorGeorg Brandl <georg@python.org>
Mon, 6 Oct 2014 12:15:06 +0000 (14:15 +0200)
committerGeorg Brandl <georg@python.org>
Mon, 6 Oct 2014 12:15:06 +0000 (14:15 +0200)
Doc/c-api/type.rst

index 22f7dd0ff6c248ca68c1d7507b7c03945dda5117..957cccf82cb715e4e1fe814b731cdcb2ebb56bbf 100644 (file)
@@ -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)