调用协议

CPython supports two different calling protocols: tp_call and vectorcall.

The tp_call Protocol

Instances of classes that set tp_call are callable. The signature of the slot is:

PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);