Skip to content

Commit 8f0672b

Browse files
review
1 parent 3c2f833 commit 8f0672b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Doc/c-api/type.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ Type Objects
138138
Return non-zero if the type object *type* sets the subclass flag *flag*.
139139
Subclass flags are denoted by
140140
:c:macro:`Py_TPFLAGS_*_SUBCLASS <Py_TPFLAGS_LONG_SUBCLASS>`.
141+
This function is used by most ``_Check`` functions.
141142
142143
143144
.. c:function:: int PyType_IS_GC(PyTypeObject *o)

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,8 +1351,8 @@ and :c:data:`PyType_Type` effectively act as defaults.)
13511351
.. c:macro:: Py_TPFLAGS_BASE_EXC_SUBCLASS
13521352
.. c:macro:: Py_TPFLAGS_TYPE_SUBCLASS
13531353
1354-
These flags are used by functions such as :c:func:`PyType_FastSubclass` and
1355-
:c:func:`PyLong_Check` to quickly determine if a type is a subclass
1354+
Functions such as :c:func:`PyLong_Check` will call :c:func:`PyType_FastSubclass`
1355+
with one of these flags to quickly determine if a type is a subclass
13561356
of a built-in type; such specific checks are faster than a generic
13571357
check, like :c:func:`PyObject_IsInstance`. Custom types that inherit
13581358
from built-ins should have their :c:member:`~PyTypeObject.tp_flags`

0 commit comments

Comments
 (0)