Type Objects — Python 3.11.16 documentation

docs.python.org

Tin mới

Concrete Objects Layer

Python Module Index

3.11.16 Documentation

Python/C API Reference Manual

PyTypeObject.tp_flags

Return the tp_flags member of type. This function is primarily meant for use with Py_LIMITED_API; the individual flag bits are guaranteed to be stable across Python releases, but access to tp_flags itself is not part of

__subclasscheck__()

This function only checks for actual subtypes, which means that __subclasscheck__() is not called on b. Call PyObject_IsSubclass() to do the same check that issubclass() would do.

PyObject_IsSubclass()

This function only checks for actual subtypes, which means that __subclasscheck__() is not called on b. Call PyObject_IsSubclass() to do the same check that issubclass() would do.

PyModule_GetState()

Return the state of the module object associated with the given type. This is a shortcut for calling PyModule_GetState() on the result of PyType_GetModule().