@@ -563,10 +563,10 @@ but need extra remarks for use as slots:
563563 :c:member:`Slot ID <PySlot.sl_id>` for the name of the type,
564564 used to set :c:member:`PyTypeObject.tp_name`.
565565
566- This slot (or :c:func : `PyType_Spec.name `) is required to create a type.
566+ This slot (or :c:member : `PyType_Spec.name `) is required to create a type.
567567
568568 This may not be used in :c:member:`PyType_Spec.slots`.
569- Use :c:func :`PyType_Spec.name` instead.
569+ Use :c:member :`PyType_Spec.name` instead.
570570
571571 .. impl-detail::
572572
@@ -585,7 +585,7 @@ but need extra remarks for use as slots:
585585 The value must be positive.
586586
587587 This may not be used in :c:member:`PyType_Spec.slots`.
588- Use :c:func :`PyType_Spec.basicsize` instead.
588+ Use :c:member :`PyType_Spec.basicsize` instead.
589589
590590 This slot may not be used with :c:func:`PyType_GetSlot`.
591591 Use :c:member:`PyTypeObject.tp_basicsize` instead if needed, but be aware
@@ -616,7 +616,7 @@ but need extra remarks for use as slots:
616616 :c:macro:`!Py_tp_extra_basicsize` is an error.
617617
618618 This may not be used in :c:member:`PyType_Spec.slots`.
619- Use negative :c:func :`PyType_Spec.basicsize` instead.
619+ Use negative :c:member :`PyType_Spec.basicsize` instead.
620620
621621 This slot may not be used with :c:func:`PyType_GetSlot`.
622622
@@ -648,7 +648,7 @@ but need extra remarks for use as slots:
648648 - With the :c:macro:`Py_TPFLAGS_ITEMS_AT_END` flag.
649649
650650 This may not be used in :c:member:`PyType_Spec.slots`.
651- Use :c:func :`PyType_Spec.itemsize` instead.
651+ Use :c:member :`PyType_Spec.itemsize` instead.
652652
653653 This slot may not be used with :c:func:`PyType_GetSlot`.
654654
@@ -663,13 +663,44 @@ but need extra remarks for use as slots:
663663 :c:func:`PyType_FromSpecWithBases` sets it automatically.
664664
665665 This may not be used in :c:member:`PyType_Spec.slots`.
666- Use negative :c:func :`PyType_Spec.basicsize` instead.
666+ Use negative :c:member :`PyType_Spec.basicsize` instead.
667667
668668 This slot may not be used with :c:func:`PyType_GetSlot`.
669669 Use :c:func:`PyType_GetFlags` instead.
670670
671671 .. versionadded:: 3.15
672672
673+ .. c:macro:: Py_tp_bases
674+
675+ :c:member:`Slot ID <PySlot.sl_id>` for type flags, used to set
676+ :c:member:`PyTypeObject.tp_bases`.
677+
678+ The slot can be set to a tuple of type objects which the newly created
679+ type should inherit from, like the "positional arguments" of
680+ a Python :ref:`class definition <class>`.
681+
682+ Alternately, the slot can be set to a single type object to specify
683+ a single base.
684+ The effect is the same as specifying a one-element tuple.
685+
686+ .. versionchanged:: 3.15
687+
688+ Previously, :c:macro:`!Py_tp_bases` required a tuple of types.
689+
690+ .. c:macro:: Py_tp_base
691+
692+ Equivalent to :c:macro:`Py_tp_bases` (with ``s `` at the end).
693+ If both are specified, :c:macro:`!Py_tp_bases` takes priority and
694+ this slot is ignored.
695+
696+ .. versionchanged:: 3.15
697+
698+ Previously, :c:macro:`!Py_tp_base` required a single type, not a tuple.
699+
700+ .. soft-deprecated:: 3.15
701+
702+ When not targetting older Python versions, pefer :c:macro:`!Py_tp_bases`.
703+
673704The following slots do not correspond to public fields in the
674705underlying structures:
675706
0 commit comments