Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Document PyDescr_COMMON
  • Loading branch information
ZeroIntensity committed Jan 16, 2026
commit 6898b426a676290efbd7e65a4c00eb627f2df563
22 changes: 17 additions & 5 deletions Doc/c-api/descriptor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ found in the dictionary of type objects.

.. XXX document these!

.. c:var:: PyTypeObject PyProperty_Type

The type object for the built-in descriptor types.


.. c:function:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)


Expand Down Expand Up @@ -74,9 +69,26 @@ found in the dictionary of type objects.
.. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)


.. c:macro:: PyDescr_COMMON

This is a :term:`soft deprecated` macro including the common fields for a
descriptor object.

This was included in Python's C API by mistake; do not use it in extensions.
For creating custom descriptor objects, create a class implementing the
descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and
:c:member:`~PyTypeObject.tp_descr_set`).


Built-in descriptors
^^^^^^^^^^^^^^^^^^^^

.. c:var:: PyTypeObject PyProperty_Type

The type object for property objects. This is the same object as
:class:`property` in the Python layer.


.. c:var:: PyTypeObject PySuper_Type

The type object for super objects. This is the same object as
Expand Down
Loading