Abstract Objects Layer¶
The functions in this chapter interact with Python objects regardless of their type, or with wide classes of object types (e.g. all numerical types, or all sequence types). When used on object types for which they do not apply, they will raise a Python exception.
It is not possible to use these functions on objects that are not properly
initialized, such as a list object that has been created by PyList_New(),
but whose items have not been set to some non-NULL value yet.
- Object Protocol
Py_NotImplementedPy_RETURN_NOTIMPLEMENTEDPyObject_Print()PyObject_HasAttr()PyObject_HasAttrString()PyObject_GetAttr()PyObject_GetAttrString()PyObject_GenericGetAttr()PyObject_SetAttr()PyObject_SetAttrString()PyObject_GenericSetAttr()PyObject_DelAttr()PyObject_DelAttrString()PyObject_GenericGetDict()PyObject_GenericSetDict()PyObject_RichCompare()PyObject_RichCompareBool()PyObject_Format()PyObject_Repr()PyObject_ASCII()PyObject_Str()PyObject_Bytes()PyObject_IsSubclass()PyObject_IsInstance()PyObject_Hash()PyObject_HashNotImplemented()PyObject_IsTrue()PyObject_Not()PyObject_Type()PyObject_TypeCheck()PyObject_Size()PyObject_Length()PyObject_LengthHint()PyObject_GetItem()PyObject_SetItem()PyObject_DelItem()PyObject_Dir()PyObject_GetIter()PyObject_GetAIter()
- Call Protocol
- The tp_call Protocol
- The Vectorcall Protocol
- Object Calling API
PyObject_Call()PyObject_CallNoArgs()PyObject_CallOneArg()PyObject_CallObject()PyObject_CallFunction()PyObject_CallMethod()PyObject_CallFunctionObjArgs()PyObject_CallMethodObjArgs()PyObject_CallMethodNoArgs()PyObject_CallMethodOneArg()PyObject_Vectorcall()PyObject_VectorcallDict()PyObject_VectorcallMethod()
- Call Support API
- Number Protocol
PyNumber_Check()PyNumber_Add()PyNumber_Subtract()PyNumber_Multiply()PyNumber_MatrixMultiply()PyNumber_FloorDivide()PyNumber_TrueDivide()PyNumber_Remainder()PyNumber_Divmod()PyNumber_Power()PyNumber_Negative()PyNumber_Positive()PyNumber_Absolute()PyNumber_Invert()PyNumber_Lshift()PyNumber_Rshift()PyNumber_And()PyNumber_Xor()PyNumber_Or()PyNumber_InPlaceAdd()PyNumber_InPlaceSubtract()PyNumber_InPlaceMultiply()PyNumber_InPlaceMatrixMultiply()PyNumber_InPlaceFloorDivide()PyNumber_InPlaceTrueDivide()PyNumber_InPlaceRemainder()PyNumber_InPlacePower()PyNumber_InPlaceLshift()PyNumber_InPlaceRshift()PyNumber_InPlaceAnd()PyNumber_InPlaceXor()PyNumber_InPlaceOr()PyNumber_Long()PyNumber_Float()PyNumber_Index()PyNumber_ToBase()PyNumber_AsSsize_t()PyIndex_Check()
- Sequence Protocol
PySequence_Check()PySequence_Size()PySequence_Length()PySequence_Concat()PySequence_Repeat()PySequence_InPlaceConcat()PySequence_InPlaceRepeat()PySequence_GetItem()PySequence_GetSlice()PySequence_SetItem()PySequence_DelItem()PySequence_SetSlice()PySequence_DelSlice()PySequence_Count()PySequence_Contains()PySequence_Index()PySequence_List()PySequence_Tuple()PySequence_Fast()PySequence_Fast_GET_SIZE()PySequence_Fast_GET_ITEM()PySequence_Fast_ITEMS()PySequence_ITEM()
- Mapping Protocol
- Iterator Protocol
- Buffer Protocol
- Old Buffer Protocol