> **Источник:** https://python-all.ru/3.1/c-api/descriptor.html
>
> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.

---

# Объекты дескрипторов

«Дескрипторы» – это объекты, описывающие некоторый атрибут объекта. Они находятся в словаре объектов типов.

**[PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) `PyProperty_Type`**

Объект типа для встроенных типов дескрипторов.

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyDescr_NewGetSet`([PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) *\*type*, struct PyGetSetDef *\*getset*)**

*Возвращаемое значение: новая ссылка.*

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyDescr_NewMember`([PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) *\*type*, struct [PyMemberDef](https://python-all.ru/3.1/c-api/structures.html#PyMemberDef) *\*meth*)**

*Возвращаемое значение: новая ссылка.*

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyDescr_NewMethod`([PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) *\*type*, struct [PyMethodDef](https://python-all.ru/3.1/c-api/structures.html#PyMethodDef) *\*meth*)**

*Возвращаемое значение: новая ссылка.*

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyDescr_NewWrapper`([PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) *\*type*, struct wrapperbase *\*wrapper*, void *\*wrapped*)**

*Возвращаемое значение: новая ссылка.*

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyDescr_NewClassMethod`([PyTypeObject](https://python-all.ru/3.1/c-api/type.html#PyTypeObject) *\*type*, [PyMethodDef](https://python-all.ru/3.1/c-api/structures.html#PyMethodDef) *\*method*)**

*Возвращаемое значение: новая ссылка.*

**int `PyDescr_IsData`([PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject) *\*descr*)**

Возвращает true, если объект-дескриптор

*descr*

описывает атрибут данных, или false, если описывает метод.

*descr*

должен быть объектом-дескриптором; проверка ошибок не выполняется.

**[PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject)\* `PyWrapper_New`([PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject) *\**, [PyObject](https://python-all.ru/3.1/c-api/structures.html#PyObject) *\**)**

*Возвращаемое значение: новая ссылка.*
