From b74cf54a647d8038c7fd40effe6049570a03818b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 6 Oct 2014 14:15:06 +0200 Subject: [PATCH] Closes #22507: document that PyType_IsSubtype does not call __subclasscheck__. --- Doc/c-api/type.rst | 5 +++++ 1 file changed, 5 insertions(+) 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) -- 2.50.1