Message308895
According to the c code in Include/descrobject.h
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
and according to the "data model" chapter,
a data descriptor is an object who has __set__ and /or __delete__.
the "inspect.isdatadescriptor" checks for existence of __get__ and __set__ which IMHO is wrong. an object with __set__/__delete__ only will return falsely False (should be True).
This is related to @Serhiy Storchaka comment in issue 26103 opened by @Aaron Hall. |
|
Date |
User |
Action |
Args |
2017-12-21 18:57:05 | chnlior | set | recipients:
+ chnlior, docs@python |
2017-12-21 18:57:04 | chnlior | set | messageid: <1513882624.99.0.213398074469.issue32400@psf.upfronthosting.co.za> |
2017-12-21 18:57:04 | chnlior | link | issue32400 messages |
2017-12-21 18:57:04 | chnlior | create | |
|