描述符對象?

“描述符”是描述對象的某些屬性的對象。它們存在于類型對象的字典中。

PyTypeObject PyProperty_Type?
Part of the Stable ABI.

內(nèi)建描述符類型的類型對象。

PyObject *PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)?
Return value: New reference. Part of the Stable ABI.
PyObject *PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)?
Return value: New reference. Part of the Stable ABI.
PyObject *PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)?
Return value: New reference. Part of the Stable ABI.
PyObject *PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)?
Return value: New reference.
PyObject *PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)?
Return value: New reference. Part of the Stable ABI.
int PyDescr_IsData(PyObject *descr)?

如果描述符對象 descr 描述的是一個數(shù)據(jù)屬性則返回非零值,或者如果它描述的是一個方法則返回 0。 descr 必須為一個描述符對象;不會進(jìn)行錯誤檢測。

PyObject *PyWrapper_New(PyObject*, PyObject*)?
Return value: New reference. Part of the Stable ABI.