描述符对象

描述符”是描述对象的某些属性对象。它们是在类型对象的字典中找到的.

PyTypeObject PyProperty_Type
内置描述符类型的类型对象.
PyObject* PyDescr_NewGetSet PyTypeObject  *typestruct PyGetSetDef  *getset
Return value: New reference.
PyObject * PyDescr_NewMember PyTypeObject  *typestruct PyMemberDef  *meth
Return value: New reference.
PyObject * PyDescr_NewMethod PyTypeObject  *typestruct PyMethodDef  *meth
Return value: New reference.
PyObject * PyDescr_NewWrapper PyTypeObject  *type,struct wrapperbase  *wrapper,void  *wrapped
Return value: New reference.
PyObject* PyDescr_NewClassMethod PyTypeObject  *typePyMethodDef  *method
Return value: New reference.
int PyDescr_IsDataPyObject  *descr
如果描述符对象descr描述数据属性,则返回true;如果描述方法,则返回false。descr必须是描述符对象;没有错误检查.
PyObject* PyWrapper_New PyObject  *,PyObject  *
Return value: New reference.

评论被关闭。