描述符對(duì)象?
“描述符”是描述對(duì)象的某些屬性的對(duì)象。它們存在于類型對(duì)象的字典中。
-
PyTypeObject PyProperty_Type?
- Part of the Stable ABI.
內(nèi)建描述符類型的類型對(duì)象。
-
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)?
如果描述符對(duì)象 descr 描述的是一個(gè)數(shù)據(jù)屬性則返回非零值,或者如果它描述的是一個(gè)方法則返回
0
。 descr 必須為一個(gè)描述符對(duì)象;不會(huì)進(jìn)行錯(cuò)誤檢測(cè)。
-
PyObject *PyWrapper_New(PyObject*, PyObject*)?
- Return value: New reference. Part of the Stable ABI.