blob: 5db257072ab39e3ed399276dfd26fa81410ba873 [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
13.. cvar:: PyTypeObject PyProperty_Type
14
15 The type object for the built-in descriptor types.
16
17
18.. cfunction:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)
19
20
21.. cfunction:: PyObject* PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)
22
23
24.. cfunction:: PyObject* PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)
25
26
27.. cfunction:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)
28
29
30.. cfunction:: PyObject* PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)
31
32
33.. cfunction:: int PyDescr_IsData(PyObject *descr)
34
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
40.. cfunction:: PyObject* PyWrapper_New(PyObject *, PyObject *)