Objetos Descritores¶
“Descritores” são objetos que descrevem algum atributo de um objeto. Eles são encontrados no dicionário de objetos de tipo.
-
PyTypeObject PyProperty_Type¶
- Parte da ABI Estável.
O tipo de objeto para os tipos de descritores embutidos.
-
PyObject *PyDescr_NewGetSet(PyTypeObject *type, struct PyGetSetDef *getset)¶
- Retorna valor: Nova referência. Parte da ABI Estável.
-
PyObject *PyDescr_NewMember(PyTypeObject *type, struct PyMemberDef *meth)¶
- Retorna valor: Nova referência. Parte da ABI Estável.
-
PyObject *PyDescr_NewMethod(PyTypeObject *type, struct PyMethodDef *meth)¶
- Retorna valor: Nova referência. Parte da ABI Estável.
-
PyObject *PyDescr_NewWrapper(PyTypeObject *type, struct wrapperbase *wrapper, void *wrapped)¶
- Retorna valor: Nova referência.
-
PyObject *PyDescr_NewClassMethod(PyTypeObject *type, PyMethodDef *method)¶
- Retorna valor: Nova referência. Parte da ABI Estável.
-
int PyDescr_IsData(PyObject *descr)¶
Retorna não-zero se o objeto descritor descr descrevem um atributo de dados, ou
0se os mesmos descrevem um método. descr deve ser um objeto descritor; não há verificação de erros.
-
PyObject *PyWrapper_New(PyObject*, PyObject*)¶
- Retorna valor: Nova referência. Parte da ABI Estável.
Built-in descriptors¶
-
PyTypeObject PySuper_Type¶
- Parte da ABI Estável.
The type object for super objects. This is the same object as
superin the Python layer.
-
PyTypeObject PyClassMethod_Type¶
The type of class method objects. This is the same object as
classmethodin the Python layer.
-
PyObject *PyClassMethod_New(PyObject *callable)¶
Create a new
classmethodobject wrapping callable. callable must be a callable object and must not beNULL.On success, this function returns a strong reference to a new class method descriptor. On failure, this function returns
NULLwith an exception set.
-
PyTypeObject PyStaticMethod_Type¶
The type of static method objects. This is the same object as
staticmethodin the Python layer.
-
PyObject *PyStaticMethod_New(PyObject *callable)¶
Create a new
staticmethodobject wrapping callable. callable must be a callable object and must not beNULL.On success, this function returns a strong reference to a new static method descriptor. On failure, this function returns
NULLwith an exception set.