Merged revisions 75928 via svnmerge from
[python/dscho.git] / Doc / c-api / descriptor.rst
blob5db257072ab39e3ed399276dfd26fa81410ba873
1 .. highlightlang:: c
3 .. _descriptor-objects:
5 Descriptor Objects
6 ------------------
8 "Descriptors" are objects that describe some attribute of an object. They are
9 found in the dictionary of type objects.
11 .. XXX document these!
13 .. cvar:: PyTypeObject PyProperty_Type
15    The type object for the built-in descriptor types.
18 .. cfunction:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)
21 .. cfunction:: PyObject* PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)
24 .. cfunction:: PyObject* PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)
27 .. cfunction:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)
30 .. cfunction:: PyObject* PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)
33 .. cfunction:: int PyDescr_IsData(PyObject *descr)
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.
40 .. cfunction:: PyObject* PyWrapper_New(PyObject *, PyObject *)