blob: c8f6fa5bcd7fc86b7f977adb793332e2677dae13 [file] [log] [blame]
Georg Brandl54a3faa2008-01-20 09:30:57 +00001.. highlightlang:: c
2
3.. _descriptor-objects:
4
5Descriptor Objects
6------------------
7
8"Descriptors" are objects that describe some attribute of an object. They are
9found in the dictionary of type objects.
10
11.. XXX document these!
12
Georg Brandl60203b42010-10-06 10:11:56 +000013.. c:var:: PyTypeObject PyProperty_Type
Georg Brandl54a3faa2008-01-20 09:30:57 +000014
15 The type object for the built-in descriptor types.
16
17
Georg Brandl60203b42010-10-06 10:11:56 +000018.. c:function:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)
Georg Brandl54a3faa2008-01-20 09:30:57 +000019
20
Georg Brandl60203b42010-10-06 10:11:56 +000021.. c:function:: PyObject* PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)
Georg Brandl54a3faa2008-01-20 09:30:57 +000022
23
Georg Brandl60203b42010-10-06 10:11:56 +000024.. c:function:: PyObject* PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)
Georg Brandl54a3faa2008-01-20 09:30:57 +000025
26
Georg Brandl60203b42010-10-06 10:11:56 +000027.. c:function:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)
Georg Brandl54a3faa2008-01-20 09:30:57 +000028
29
Georg Brandl60203b42010-10-06 10:11:56 +000030.. c:function:: PyObject* PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)
Georg Brandl54a3faa2008-01-20 09:30:57 +000031
32
Georg Brandl60203b42010-10-06 10:11:56 +000033.. c:function:: int PyDescr_IsData(PyObject *descr)
Georg Brandl54a3faa2008-01-20 09:30:57 +000034
35 Return true if the descriptor objects *descr* describes a data attribute, or
36 false if it describes a method. *descr* must be a descriptor object; there is
37 no error checking.
38
39
Georg Brandl60203b42010-10-06 10:11:56 +000040.. c:function:: PyObject* PyWrapper_New(PyObject *, PyObject *)