Common Object Structures — Python 3.9.25 documentation

docs.python.org

Tin mới

Allocating Objects on the Heap

Python documentation for the current stable release

There are a large number of structures which are used in the definition of object types for Python. This section describes these structures and how they are used.

Python Module Index

3.9.25 Documentation

Python/C API Reference Manual

Object Implementation Support

PyArg_ParseTuple()

This is the typical calling convention, where the methods have the type PyCFunction. The function expects two PyObject* values. The first one is the self object for methods; for module functions, it is the module object.

vectorcall protocol

object.__contains__

PyTypeObject.tp_dictoffset

Structure which describes an attribute of a type which corresponds to a C struct member. Its fields are: