class Slot: (source)
A "slot" describes a Python operator. In particular, it describes how a magic method (E.g. "__add__") relates to the opcode ("BINARY_ADD") and the C function pointer ("nb_add"). Attributes: python_name: The name of the Python method. E.g. "__add__". c_name: The name of the C function pointer. Only use the base name, e.g. for tp_as_number->nb_add, use nb_add. function_type: Type of the C function index: If multiple python methods share the same function pointer (e.g. __add__ and __radd__), this is 0 or 1. opcode: The name of the opcode that CPython uses to call this function. This is only filled in for operators (e.g. BINARY_SUBSCR), but not for operations (e.g. STORE_SUBSCR). python_version: "2", "3", or (default) "*". symbol: Only filled in for operators. The corresponding symbol, e.g., "+" for __add__, if one exists; otherwise, a human-friendly description, e.g., "item retrieval" for __getitem__.
Class Variable | c |
Undocumented |
Class Variable | function |
Undocumented |
Class Variable | index |
Undocumented |
Class Variable | opcode |
Undocumented |
Class Variable | python |
Undocumented |
Class Variable | python |
Undocumented |
Class Variable | symbol |
Undocumented |