@@ -8463,14 +8463,14 @@ typedef struct wrapperbase slotdef;
8463
8463
#undef RBINSLOT
8464
8464
8465
8465
#define TPSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
8466
- {NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8466
+ {# NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8467
8467
PyDoc_STR(DOC), .name_strobj = &_Py_ID(NAME)}
8468
8468
#define FLSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC , FLAGS ) \
8469
- {NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8469
+ {# NAME, offsetof(PyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8470
8470
PyDoc_STR(DOC), FLAGS, .name_strobj = &_Py_ID(NAME) }
8471
8471
#define ETSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
8472
- {NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8473
- PyDoc_STR(DOC), .. name_strobj = &_Py_ID(NAME) }
8472
+ {# NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
8473
+ PyDoc_STR(DOC), .name_strobj = &_Py_ID(NAME) }
8474
8474
#define AMSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
8475
8475
ETSLOT(NAME, as_async.SLOT, FUNCTION, WRAPPER, DOC)
8476
8476
#define SQSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
@@ -8481,211 +8481,210 @@ typedef struct wrapperbase slotdef;
8481
8481
ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, DOC)
8482
8482
#define UNSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
8483
8483
ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
8484
- NAME "($self, /)\n--\n\n" DOC)
8484
+ # NAME "($self, /)\n--\n\n" DOC)
8485
8485
#define IBSLOT (NAME , SLOT , FUNCTION , WRAPPER , DOC ) \
8486
8486
ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \
8487
- NAME "($self, value, /)\n--\n\nReturn self" DOC "value.")
8487
+ # NAME "($self, value, /)\n--\n\nReturn self" DOC "value.")
8488
8488
#define BINSLOT (NAME , SLOT , FUNCTION , DOC ) \
8489
8489
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
8490
- NAME "($self, value, /)\n--\n\nReturn self" DOC "value.")
8490
+ # NAME "($self, value, /)\n--\n\nReturn self" DOC "value.")
8491
8491
#define RBINSLOT (NAME , SLOT , FUNCTION , DOC ) \
8492
8492
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
8493
- NAME "($self, value, /)\n--\n\nReturn value" DOC "self.")
8493
+ # NAME "($self, value, /)\n--\n\nReturn value" DOC "self.")
8494
8494
#define BINSLOTNOTINFIX (NAME , SLOT , FUNCTION , DOC ) \
8495
8495
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \
8496
- NAME "($self, value, /)\n--\n\n" DOC)
8496
+ # NAME "($self, value, /)\n--\n\n" DOC)
8497
8497
#define RBINSLOTNOTINFIX (NAME , SLOT , FUNCTION , DOC ) \
8498
8498
ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_r, \
8499
- NAME "($self, value, /)\n--\n\n" DOC)
8499
+ # NAME "($self, value, /)\n--\n\n" DOC)
8500
8500
8501
8501
static slotdef slotdefs [] = {
8502
- TPSLOT (" __getattribute__" , tp_getattr , NULL , NULL , "" ),
8503
- TPSLOT (" __getattr__" , tp_getattr , NULL , NULL , "" ),
8504
- TPSLOT (" __setattr__" , tp_setattr , NULL , NULL , "" ),
8505
- TPSLOT (" __delattr__" , tp_setattr , NULL , NULL , "" ),
8506
- TPSLOT (" __repr__" , tp_repr , slot_tp_repr , wrap_unaryfunc ,
8502
+ TPSLOT (__getattribute__ , tp_getattr , NULL , NULL , "" ),
8503
+ TPSLOT (__getattr__ , tp_getattr , NULL , NULL , "" ),
8504
+ TPSLOT (__setattr__ , tp_setattr , NULL , NULL , "" ),
8505
+ TPSLOT (__delattr__ , tp_setattr , NULL , NULL , "" ),
8506
+ TPSLOT (__repr__ , tp_repr , slot_tp_repr , wrap_unaryfunc ,
8507
8507
"__repr__($self, /)\n--\n\nReturn repr(self)." ),
8508
- TPSLOT (" __hash__" , tp_hash , slot_tp_hash , wrap_hashfunc ,
8508
+ TPSLOT (__hash__ , tp_hash , slot_tp_hash , wrap_hashfunc ,
8509
8509
"__hash__($self, /)\n--\n\nReturn hash(self)." ),
8510
- FLSLOT (" __call__" , tp_call , slot_tp_call , (wrapperfunc )(void (* )(void ))wrap_call ,
8510
+ FLSLOT (__call__ , tp_call , slot_tp_call , (wrapperfunc )(void (* )(void ))wrap_call ,
8511
8511
"__call__($self, /, *args, **kwargs)\n--\n\nCall self as a function." ,
8512
8512
PyWrapperFlag_KEYWORDS ),
8513
- TPSLOT (" __str__" , tp_str , slot_tp_str , wrap_unaryfunc ,
8513
+ TPSLOT (__str__ , tp_str , slot_tp_str , wrap_unaryfunc ,
8514
F438
8514
"__str__($self, /)\n--\n\nReturn str(self)." ),
8515
- TPSLOT (" __getattribute__" , tp_getattro , _Py_slot_tp_getattr_hook ,
8515
+ TPSLOT (__getattribute__ , tp_getattro , _Py_slot_tp_getattr_hook ,
8516
8516
wrap_binaryfunc ,
8517
8517
"__getattribute__($self, name, /)\n--\n\nReturn getattr(self, name)." ),
8518
- TPSLOT (" __getattr__" , tp_getattro , _Py_slot_tp_getattr_hook , NULL , "" ),
8519
- TPSLOT (" __setattr__" , tp_setattro , slot_tp_setattro , wrap_setattr ,
8518
+ TPSLOT (__getattr__ , tp_getattro , _Py_slot_tp_getattr_hook , NULL , "" ),
8519
+ TPSLOT (__setattr__ , tp_setattro , slot_tp_setattro , wrap_setattr ,
8520
8520
"__setattr__($self, name, value, /)\n--\n\nImplement setattr(self, name, value)." ),
8521
- TPSLOT (" __delattr__" , tp_setattro , slot_tp_setattro , wrap_delattr ,
8521
+ TPSLOT (__delattr__ , tp_setattro , slot_tp_setattro , wrap_delattr ,
8522
8522
"__delattr__($self, name, /)\n--\n\nImplement delattr(self, name)." ),
8523
- TPSLOT (" __lt__" , tp_richcompare , slot_tp_richcompare , richcmp_lt ,
8523
+ TPSLOT (__lt__ , tp_richcompare , slot_tp_richcompare , richcmp_lt ,
8524
8524
"__lt__($self, value, /)\n--\n\nReturn self<value." ),
8525
- TPSLOT (" __le__" , tp_richcompare , slot_tp_richcompare , richcmp_le ,
8525
+ TPSLOT (__le__ , tp_richcompare , slot_tp_richcompare , richcmp_le ,
8526
8526
"__le__($self, value, /)\n--\n\nReturn self<=value." ),
8527
- TPSLOT (" __eq__" , tp_richcompare , slot_tp_richcompare , richcmp_eq ,
8527
+ TPSLOT (__eq__ , tp_richcompare , slot_tp_richcompare , richcmp_eq ,
8528
8528
"__eq__($self, value, /)\n--\n\nReturn self==value." ),
8529
- TPSLOT (" __ne__" , tp_richcompare , slot_tp_richcompare , richcmp_ne ,
8529
+ TPSLOT (__ne__ , tp_richcompare , slot_tp_richcompare , richcmp_ne ,
8530
8530
"__ne__($self, value, /)\n--\n\nReturn self!=value." ),
8531
- TPSLOT (" __gt__" , tp_richcompare , slot_tp_richcompare , richcmp_gt ,
8531
+ TPSLOT (__gt__ , tp_richcompare , slot_tp_richcompare , richcmp_gt ,
8532
8532
"__gt__($self, value, /)\n--\n\nReturn self>value." ),
8533
- TPSLOT (" __ge__" , tp_richcompare , slot_tp_richcompare , richcmp_ge ,
8533
+ TPSLOT (__ge__ , tp_richcompare , slot_tp_richcompare , richcmp_ge ,
8534
8534
"__ge__($self, value, /)\n--\n\nReturn self>=value." ),
8535
- TPSLOT (" __iter__" , tp_iter , slot_tp_iter , wrap_unaryfunc ,
8535
+ TPSLOT (__iter__ , tp_iter , slot_tp_iter , wrap_unaryfunc ,
8536
8536
"__iter__($self, /)\n--\n\nImplement iter(self)." ),
8537
- TPSLOT (" __next__" , tp_iternext , slot_tp_iternext , wrap_next ,
8537
+ TPSLOT (__next__ , tp_iternext , slot_tp_iternext , wrap_next ,
8538
8538
"__next__($self, /)\n--\n\nImplement next(self)." ),
8539
- TPSLOT (" __get__" , tp_descr_get , slot_tp_descr_get , wrap_descr_get ,
8539
+ TPSLOT (__get__ , tp_descr_get , slot_tp_descr_get , wrap_descr_get ,
8540
8540
"__get__($self, instance, owner=None, /)\n--\n\nReturn an attribute of instance, which is of type owner." ),
8541
- TPSLOT (" __set__" , tp_descr_set , slot_tp_descr_set , wrap_descr_set ,
8541
+ TPSLOT (__set__ , tp_descr_set , slot_tp_descr_set , wrap_descr_set ,
8542
8542
"__set__($self, instance, value, /)\n--\n\nSet an attribute of instance to value." ),
8543
- TPSLOT (" __delete__" , tp_descr_set , slot_tp_descr_set ,
8543
+ TPSLOT (__delete__ , tp_descr_set , slot_tp_descr_set ,
8544
8544
wrap_descr_delete ,
8545
8545
"__delete__($self, instance, /)\n--\n\nDelete an attribute of instance." ),
8546
- FLSLOT (" __init__" , tp_init , slot_tp_init , (wrapperfunc )(void (* )(void ))wrap_init ,
8546
+ FLSLOT (__init__ , tp_init , slot_tp_init , (wrapperfunc )(void (* )(void ))wrap_init ,
8547
8547
"__init__($self, /, *args, **kwargs)\n--\n\n"
8548
8548
"Initialize self. See help(type(self)) for accurate signature." ,
8549
8549
PyWrapperFlag_KEYWORDS ),
8550
- TPSLOT (" __new__" , tp_new , slot_tp_new , NULL ,
8550
+ TPSLOT (__new__ , tp_new , slot_tp_new , NULL ,
8551
8551
"__new__(type, /, *args, **kwargs)\n--\n\n"
8552
8552
"Create and return new object. See help(type) for accurate signature." ),
8553
- TPSLOT (" __del__" , tp_finalize , slot_tp_finalize , (wrapperfunc )wrap_del , "" ),
8553
+ TPSLOT (__del__ , tp_finalize , slot_tp_finalize , (wrapperfunc )wrap_del , "" ),
8554
8554
8555
- AMSLOT (" __await__" , am_await , slot_am_await , wrap_unaryfunc ,
8555
+ AMSLOT (__await__ , am_await , slot_am_await , wrap_unaryfunc ,
8556
8556
"__await__($self, /)\n--\n\nReturn an iterator to be used in await expression." ),
8557
- AMSLOT (" __aiter__" , am_aiter , slot_am_aiter , wrap_unaryfunc ,
8557
+ AMSLOT (__aiter__ , am_aiter , slot_am_aiter , wrap_unaryfunc ,
8558
8558
"__aiter__($self, /)\n--\n\nReturn an awaitable, that resolves in asynchronous iterator." ),
8559
- AMSLOT (" __anext__" , am_anext , slot_am_anext , wrap_unaryfunc ,
8559
+ AMSLOT (__anext__ , am_anext , slot_am_anext , wrap_unaryfunc ,
8560
8560
"__anext__($self, /)\n--\n\nReturn a value or raise StopAsyncIteration." ),
8561
8561
8562
- BINSLOT (" __add__" , nb_add , slot_nb_add ,
8562
+ BINSLOT (__add__ , nb_add , slot_nb_add ,
8563
8563
"+" ),
8564
- RBINSLOT (" __radd__" , nb_add , slot_nb_add ,
8564
+ RBINSLOT (__radd__ , nb_add , slot_nb_add ,
8565
8565
"+" ),
8566
- BINSLOT (" __sub__" , nb_subtract , slot_nb_subtract ,
8566
+ BINSLOT (__sub__ , nb_subtract , slot_nb_subtract ,
8567
8567
"-" ),
8568
- RBINSLOT (" __rsub__" , nb_subtract , slot_nb_subtract ,
8568
+ RBINSLOT (__rsub__ , nb_subtract , slot_nb_subtract ,
8569
8569
"-" ),
8570
- BINSLOT (" __mul__" , nb_multiply , slot_nb_multiply ,
8570
+ BINSLOT (__mul__ , nb_multiply , slot_nb_multiply ,
8571
8571
"*" ),
8572
- RBINSLOT (" __rmul__" , nb_multiply , slot_nb_multiply ,
8572
+ RBINSLOT (__rmul__ , nb_multiply , slot_nb_multiply ,
8573
8573
"*" ),
8574
- BINSLOT (" __mod__" , nb_remainder , slot_nb_remainder ,
8574
+ BINSLOT (__mod__ , nb_remainder , slot_nb_remainder ,
8575
8575
"%" ),
8576
- RBINSLOT (" __rmod__" , nb_remainder , slot_nb_remainder ,
8576
+ RBINSLOT (__rmod__ , nb_remainder , slot_nb_remainder ,
8577
8577
"%" ),
8578
- BINSLOTNOTINFIX (" __divmod__" , nb_divmod , slot_nb_divmod ,
8578
+ BINSLOTNOTINFIX (__divmod__ , nb_divmod , slot_nb_divmod ,
8579
8579
"Return divmod(self, value)." ),
8580
- RBINSLOTNOTINFIX (" __rdivmod__" , nb_divmod , slot_nb_divmod ,
8580
+ RBINSLOTNOTINFIX (__rdivmod__ , nb_divmod , slot_nb_divmod ,
8581
8581
"Return divmod(value, self)." ),
8582
- NBSLOT (" __pow__" , nb_power , slot_nb_power , wrap_ternaryfunc ,
8582
+ NBSLOT (__pow__ , nb_power , slot_nb_power , wrap_ternaryfunc ,
8583
8583
"__pow__($self, value, mod=None, /)\n--\n\nReturn pow(self, value, mod)." ),
8584
- NBSLOT (" __rpow__" , nb_power , slot_nb_power , wrap_ternaryfunc_r ,
8584
+ NBSLOT (__rpow__ , nb_power , slot_nb_power , wrap_ternaryfunc_r ,
8585
8585
"__rpow__($self, value, mod=None, /)\n--\n\nReturn pow(value, self, mod)." ),
8586
- UNSLOT (" __neg__" , nb_negative , slot_nb_negative , wrap_unaryfunc , "-self" ),
8587
- UNSLOT (" __pos__" , nb_positive , slot_nb_positive , wrap_unaryfunc , "+self" ),
8588
- UNSLOT (" __abs__" , nb_absolute , slot_nb_absolute , wrap_unaryfunc ,
8586
+ UNSLOT (__neg__ , nb_negative , slot_nb_negative , wrap_unaryfunc , "-self" ),
8587
+ UNSLOT (__pos__ , nb_positive , slot_nb_positive , wrap_unaryfunc , "+self" ),
8588
+ UNSLOT (__abs__ , nb_absolute , slot_nb_absolute , wrap_unaryfunc ,
8589
8589
"abs(self)" ),
8590
- UNSLOT (" __bool__" , nb_bool , slot_nb_bool , wrap_inquirypred ,
8590
+ UNSLOT (__bool__ , nb_bool , slot_nb_bool , wrap_inquirypred ,
8591
8591
"True if self else False" ),
8592
- UNSLOT (" __invert__" , nb_invert , slot_nb_invert , wrap_unaryfunc , "~self" ),
8593
- BINSLOT (" __lshift__" , nb_lshift , slot_nb_lshift , "<<" ),
8594
- RBINSLOT (" __rlshift__" , nb_lshift , slot_nb_lshift , "<<" ),
8595
- BINSLOT (" __rshift__" , nb_rshift , slot_nb_rshift , ">>" ),
8596
- RBINSLOT (" __rrshift__" , nb_rshift , slot_nb_rshift , ">>" ),
8597
- BINSLOT (" __and__" , nb_and , slot_nb_and , "&" ),
8598
- RBINSLOT (" __rand__" , nb_and , slot_nb_and , "&" ),
8599
- BINSLOT (" __xor__" , nb_xor , slot_nb_xor , "^" ),
8600
- RBINSLOT (" __rxor__" , nb_xor , slot_nb_xor , "^" ),
8601
- BINSLOT (" __or__" , nb_or , slot_nb_or , "|" ),
8602
- RBINSLOT (" __ror__" , nb_or , slot_nb_or , "|" ),
8603
- UNSLOT (" __int__" , nb_int , slot_nb_int , wrap_unaryfunc ,
8592
+ UNSLOT (__invert__ , nb_invert , slot_nb_invert , wrap_unaryfunc , "~self" ),
8593
+ BINSLOT (__lshift__ , nb_lshift , slot_nb_lshift , "<<" ),
8594
+ RBINSLOT (__rlshift__ , nb_lshift , slot_nb_lshift , "<<" ),
8595
+ BINSLOT (__rshift__ , nb_rshift , slot_nb_rshift , ">>" ),
8596
+ RBINSLOT (__rrshift__ , nb_rshift , slot_nb_rshift , ">>" ),
8597
+ BINSLOT (__and__ , nb_and , slot_nb_and , "&" ),
8598
+ RBINSLOT (__rand__ , nb_and , slot_nb_and , "&" ),
8599
+ BINSLOT (__xor__ , nb_xor , slot_nb_xor , "^" ),
8600
+ RBINSLOT (__rxor__ , nb_xor , slot_nb_xor , "^" ),
8601
+ BINSLOT (__or__ , nb_or , slot_nb_or , "|" ),
8602
+ RBINSLOT (__ror__ , nb_or , slot_nb_or , "|" ),
8603
+ UNSLOT (__int__ , nb_int , slot_nb_int , wrap_unaryfunc ,
8604
8604
"int(self)" ),
8605
- UNSLOT (" __float__" , nb_float , slot_nb_float , wrap_unaryfunc ,
8605
+ UNSLOT (__float__ , nb_float , slot_nb_float , wrap_unaryfunc ,
8606
8606
"float(self)" ),
8607
- IBSLOT (" __iadd__" , nb_inplace_add , slot_nb_inplace_add ,
8607
+ IBSLOT (__iadd__ , nb_inplace_add , slot_nb_inplace_add ,
8608
8608
wrap_binaryfunc , "+=" ),
8609
- IBSLOT (" __isub__" , nb_inplace_subtract , slot_nb_inplace_subtract ,
8609
+ IBSLOT (__isub__ , nb_inplace_subtract , slot_nb_inplace_subtract ,
8610
8610
wrap_binaryfunc , "-=" ),
8611
- IBSLOT (" __imul__" , nb_inplace_multiply , slot_nb_inplace_multiply ,
8611
+ IBSLOT (__imul__ , nb_inplace_multiply , slot_nb_inplace_multiply ,
8612
8612
wrap_binaryfunc , "*=" ),
8613
- IBSLOT (" __imod__" , nb_inplace_remainder , slot_nb_inplace_remainder ,
8613
+ IBSLOT (__imod__ , nb_inplace_remainder , slot_nb_inplace_remainder ,
8614
8614
wrap_binaryfunc , "%=" ),
8615
- IBSLOT (" __ipow__" , nb_inplace_power , slot_nb_inplace_power ,
8615
+ IBSLOT (__ipow__ , nb_inplace_power , slot_nb_inplace_power ,
8616
8616
wrap_ternaryfunc , "**=" ),
8617
- IBSLOT (" __ilshift__" , nb_inplace_lshift , slot_nb_inplace_lshift ,
8617
+ IBSLOT (__ilshift__ , nb_inplace_lshift , slot_nb_inplace_lshift ,
8618
8618
wrap_binaryfunc , "<<=" ),
8619
- IBSLOT (" __irshift__" , nb_inplace_rshift , slot_nb_inplace_rshift ,
8619
+ IBSLOT (__irshift__ , nb_inplace_rshift , slot_nb_inplace_rshift ,
8620
8620
wrap_binaryfunc , ">>=" ),
8621
- IBSLOT (" __iand__" , nb_inplace_and , slot_nb_inplace_and ,
8621
+ IBSLOT (__iand__ , nb_inplace_and , slot_nb_inplace_and ,
8622
8622
wrap_binaryfunc , "&=" ),
8623
- IBSLOT (" __ixor__" , nb_inplace_xor , slot_nb_inplace_xor ,
8623
+ IBSLOT (__ixor__ , nb_inplace_xor , slot_nb_inplace_xor ,
8624
8624
wrap_binaryfunc , "^=" ),
8625
- IBSLOT (" __ior__" , nb_inplace_or , slot_nb_inplace_or ,
8625
+ IBSLOT (__ior__ , nb_inplace_or , slot_nb_inplace_or ,
8626
8626
wrap_binaryfunc , "|=" ),
8627
- BINSLOT (" __floordiv__" , nb_floor_divide , slot_nb_floor_divide , "//" ),
8628
- RBINSLOT (" __rfloordiv__" , nb_floor_divide , slot_nb_floor_divide , "//" ),
8629
- BINSLOT (" __truediv__" , nb_true_divide , slot_nb_true_divide , "/" ),
8630
- RBINSLOT (" __rtruediv__" , nb_true_divide , slot_nb_true_divide , "/" ),
8631
- IBSLOT (" __ifloordiv__" , nb_inplace_floor_divide ,
8627
+ BINSLOT (__floordiv__ , nb_floor_divide , slot_nb_floor_divide , "//" ),
8628
+ RBINSLOT (__rfloordiv__ , nb_floor_divide , slot_nb_floor_divide , "//" ),
8629
+ BINSLOT (__truediv__ , nb_true_divide , slot_nb_true_divide , "/" ),
8630
+ RBINSLOT (__rtruediv__ , nb_true_divide , slot_nb_true_divide , "/" ),
8631
+ IBSLOT (__ifloordiv__ , nb_inplace_floor_divide ,
8632
8632
slot_nb_inplace_floor_divide , wrap_binaryfunc , "//=" ),
8633
- IBSLOT (" __itruediv__" , nb_inplace_true_divide ,
8633
+ IBSLOT (__itruediv__ , nb_inplace_true_divide ,
8634
8634
slot_nb_inplace_true_divide , wrap_binaryfunc , "/=" ),
8635
- NBSLOT (" __index__" , nb_index , slot_nb_index , wrap_unaryfunc ,
8635
+ NBSLOT (__index__ , nb_index , slot_nb_index , wrap_unaryfunc ,
8636
8636
"__index__($self, /)\n--\n\n"
8637
8637
"Return self converted to an integer, if self is suitable "
8638
8638
"for use as an index into a list." ),
8639
- BINSLOT (" __matmul__" , nb_matrix_multiply , slot_nb_matrix_multiply ,
8639
+ BINSLOT (__matmul__ , nb_matrix_multiply , slot_nb_matrix_multiply ,
8640
8640
"@" ),
8641
- RBINSLOT (" __rmatmul__" , nb_matrix_multiply , slot_nb_matrix_multiply ,
8641
+ RBINSLOT (__rmatmul__ , nb_matrix_multiply , slot_nb_matrix_multiply ,
8642
8642
"@" ),
8643
- IBSLOT (" __imatmul__" , nb_inplace_matrix_multiply , slot_nb_inplace_matrix_multiply ,
8643
+ IBSLOT (__imatmul__ , nb_inplace_matrix_multiply , slot_nb_inplace_matrix_multiply ,
8644
8644
wrap_binaryfunc , "@=" ),
8645
- MPSLOT (" __len__" , mp_length , slot_mp_length , wrap_lenfunc ,
8645
+ MPSLOT (__len__ , mp_length , slot_mp_length , wrap_lenfunc ,
8646
8646
"__len__($self, /)\n--\n\nReturn len(self)." ),
8647
- MPSLOT (" __getitem__" , mp_subscript , slot_mp_subscript ,
8647
+ MPSLOT (__getitem__ , mp_subscript , slot_mp_subscript ,
8648
8648
wrap_binaryfunc ,
8649
8649
"__getitem__($self, key, /)\n--\n\nReturn self[key]." ),
8650
- MPSLOT (" __setitem__" , mp_ass_subscript , slot_mp_ass_subscript ,
8650
+ MPSLOT (__setitem__ , mp_ass_subscript , slot_mp_ass_subscript ,
8651
8651
wrap_objobjargproc ,
8652
8652
"__setitem__($self, key, value, /)\n--\n\nSet self[key] to value." ),
8653
- MPSLOT (" __delitem__" , mp_ass_subscript , slot_mp_ass_subscript ,
8653
+ MPSLOT (__delitem__ , mp_ass_subscript , slot_mp_ass_subscript ,
8654
8654
wrap_delitem ,
8655
8655
"__delitem__($self, key, /)\n--\n\nDelete self[key]." ),
8656
8656
8657
- SQSLOT (" __len__" , sq_length , slot_sq_length , wrap_lenfunc ,
8657
+ SQSLOT (__len__ , sq_length , slot_sq_length , wrap_lenfunc ,
8658
8658
"__len__($self, /)\n--\n\nReturn len(self)." ),
8659
8659
/* Heap types defining __add__/__mul__ have sq_concat/sq_repeat == NULL.
8660
8660
The logic in abstract.c always falls back to nb_add/nb_multiply in
8661
8661
this case. Defining both the nb_* and the sq_* slots to call the
8662
8662
user-defined methods has unexpected side-effects, as shown by
8663
8663
test_descr.notimplemented() */
8664
- SQSLOT (" __add__" , sq_concat , NULL , wrap_binaryfunc ,
8664
+ SQSLOT (__add__ , sq_concat , NULL , wrap_binaryfunc ,
8665
8665
"__add__($self, value, /)\n--\n\nReturn self+value." ),
8666
- SQSLOT (" __mul__" , sq_repeat , NULL , wrap_indexargfunc ,
8666
+ SQSLOT (__mul__ , sq_repeat , NULL , wrap_indexargfunc ,
8667
8667
"__mul__($self, value, /)\n--\n\nReturn self*value." ),
8668
- SQSLOT (" __rmul__" , sq_repeat , NULL , wrap_indexargfunc ,
8668
+ SQSLOT (__rmul__ , sq_repeat , NULL , wrap_indexargfunc ,
8669
8669
"__rmul__($self, value, /)\n--\n\nReturn value*self." ),
8670
- SQSLOT (" __getitem__" , sq_item , slot_sq_item , wrap_sq_item ,
8670
+ SQSLOT (__getitem__ , sq_item , slot_sq_item , wrap_sq_item ,
8671
8671
"__getitem__($self, key, /)\n--\n\nReturn self[key]." ),
8672
- SQSLOT (" __setitem__" , sq_ass_item , slot_sq_ass_item , wrap_sq_setitem ,
8672
+ SQSLOT (__setitem__ , sq_ass_item , slot_sq_ass_item , wrap_sq_setitem ,
8673
8673
"__setitem__($self, key, value, /)\n--\n\nSet self[key] to value." ),
8674
- SQSLOT (" __delitem__" , sq_ass_item , slot_sq_ass_item , wrap_sq_delitem ,
8674
+ SQSLOT (__delitem__ , sq_ass_item , slot_sq_ass_item , wrap_sq_delitem ,
8675
8675
"__delitem__($self, key, /)\n--\n\nDelete self[key]." ),
8676
- SQSLOT (" __contains__" , sq_contains , slot_sq_contains , wrap_objobjproc ,
8676
+ SQSLOT (__contains__ , sq_contains , slot_sq_contains , wrap_objobjproc ,
8677
8677
"__contains__($self, key, /)\n--\n\nReturn key in self." ),
8678
- SQSLOT (" __iadd__" , sq_inplace_concat , NULL ,
8678
+ SQSLOT (__iadd__ , sq_inplace_concat , NULL ,
8679
8679
wrap_binaryfunc ,
8680
8680
"__iadd__($self, value, /)\n--\n\nImplement self+=value." ),
8681
- SQSLOT (" __imul__" , sq_inplace_repeat , NULL ,
8681
+ SQSLOT (__imul__ , sq_inplace_repeat , NULL ,
8682
8682
wrap_indexargfunc ,
8683
8683
"__imul__($self, value, /)\n--\n\nImplement self*=value." ),
8684
8684
8685
8685
{NULL }
8686
8686
};
8687
8687
8688
-
8689
8688
/* Given a type pointer and an offset gotten from a slotdef entry, return a
8690
8689
pointer to the actual slot. This is not quite the same as simply adding
8691
8690
the offset to the type pointer, since it takes care to indirect through the
0 commit comments