symbian-qemu-0.9.1-12/python-2.6.1/Doc/c-api/descriptor.rst
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 .. highlightlang:: c
       
     2 
       
     3 .. _descriptor-objects:
       
     4 
       
     5 Descriptor Objects
       
     6 ------------------
       
     7 
       
     8 "Descriptors" are objects that describe some attribute of an object. They are
       
     9 found in the dictionary of type objects.
       
    10 
       
    11 
       
    12 .. cvar:: PyTypeObject PyProperty_Type
       
    13 
       
    14    The type object for the built-in descriptor types.
       
    15 
       
    16    .. versionadded:: 2.2
       
    17 
       
    18 
       
    19 .. cfunction:: PyObject* PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)
       
    20 
       
    21    .. versionadded:: 2.2
       
    22 
       
    23 
       
    24 .. cfunction:: PyObject* PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)
       
    25 
       
    26    .. versionadded:: 2.2
       
    27 
       
    28 
       
    29 .. cfunction:: PyObject* PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)
       
    30 
       
    31    .. versionadded:: 2.2
       
    32 
       
    33 
       
    34 .. cfunction:: PyObject* PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)
       
    35 
       
    36    .. versionadded:: 2.2
       
    37 
       
    38 
       
    39 .. cfunction:: PyObject* PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)
       
    40 
       
    41    .. versionadded:: 2.3
       
    42 
       
    43 
       
    44 .. cfunction:: int PyDescr_IsData(PyObject *descr)
       
    45 
       
    46    Return true if the descriptor objects *descr* describes a data attribute, or
       
    47    false if it describes a method.  *descr* must be a descriptor object; there is
       
    48    no error checking.
       
    49 
       
    50    .. versionadded:: 2.2
       
    51 
       
    52 
       
    53 .. cfunction:: PyObject* PyWrapper_New(PyObject *, PyObject *)
       
    54 
       
    55    .. versionadded:: 2.2