module documentation

Mapping between slot / operator names. This defines the internal constants CPython uses to map magic methods to slots of PyTypeObject structures, and also other constants, like compare operator mappings.

Class Slot A "slot" describes a Python operator.
Constant CMP_ALWAYS_SUPPORTED Undocumented
Constant CMP_EQ Undocumented
Constant CMP_EXC_MATCH Undocumented
Constant CMP_GE Undocumented
Constant CMP_GT Undocumented
Constant CMP_IN Undocumented
Constant CMP_IS Undocumented
Constant CMP_IS_NOT Undocumented
Constant CMP_LE Undocumented
Constant CMP_LT Undocumented
Constant CMP_NE Undocumented
Constant CMP_NOT_IN Undocumented
Constant COMPARES Undocumented
Constant EQ Undocumented
Constant GE Undocumented
Constant GT Undocumented
Constant LE Undocumented
Constant LT Undocumented
Constant MAPPING_PREFIX Undocumented
Constant NE Undocumented
Constant NUMBER_PREFIX Undocumented
Constant REVERSE_NAME_MAPPING Undocumented
Constant SEQUENCE_PREFIX Undocumented
Constant SLOTS Undocumented
Constant SYMBOL_MAPPING Undocumented
Constant TYPEOBJECT_PREFIX Undocumented
Function _ReverseNameMapping __add__ -> __radd__, __mul__ -> __rmul__ etc.
CMP_ALWAYS_SUPPORTED = (source)

Undocumented

Value
frozenset(set([CMP_EQ, CMP_NE, CMP_IS, CMP_IS_NOT]))

Undocumented

Value
2
CMP_EXC_MATCH: int = (source)

Undocumented

Value
10

Undocumented

Value
5

Undocumented

Value
4

Undocumented

Value
6

Undocumented

Value
8
CMP_IS_NOT: int = (source)

Undocumented

Value
9

Undocumented

Value
1

Undocumented

Value
0

Undocumented

Value
3
CMP_NOT_IN: int = (source)

Undocumented

Value
7
COMPARES = (source)

Undocumented

Value
{EQ: (lambda x, y: x == y),
 NE: (lambda x, y: x != y),
 LT: (lambda x, y: x < y),
 LE: (lambda x, y: x <= y),
 GT: (lambda x, y: x > y),
 GE: (lambda x, y: x >= y)}

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

MAPPING_PREFIX: str = (source)

Undocumented

Value
'mp_'

Undocumented

NUMBER_PREFIX: str = (source)

Undocumented

Value
'nb_'
REVERSE_NAME_MAPPING = (source)

Undocumented

Value
_ReverseNameMapping()
SEQUENCE_PREFIX: str = (source)

Undocumented

Value
'sq_'

Undocumented

Value
[Slot('__new__', 'tp_new', 'new'),
 Slot('__init__', 'tp_init', 'init'),
 Slot('__str__', 'tp_print', 'print'),
 Slot('__repr__', 'tp_repr', 'repr',
      opcode='UNARY_CONVERT'),
 Slot('__hash__', 'tp_hash', 'hash'),
 Slot('__call__', 'tp_call', 'call'),
...
SYMBOL_MAPPING = (source)

Undocumented

Value
{slot.python_name: slot.symbol for slot in SLOTS if slot.symbol}
TYPEOBJECT_PREFIX: str = (source)

Undocumented

Value
'tp_'
def _ReverseNameMapping(): (source)

__add__ -> __radd__, __mul__ -> __rmul__ etc.