[docs] [issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

Lior Cohen report at bugs.python.org
Mon Dec 11 18:24:10 EST 2017


Lior Cohen <chnlior at gmail.com> added the comment:

Joining @Serhiy Storchaka last question.
Is the __get__ method existance is a must be a data descriptor?

According to the C implementation in descrobject.h
```
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
#endif
```
the answer is No.
Does this C code reflect the true definition?

----------
nosy: +chnlior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26103>
_______________________________________


More information about the docs mailing list