You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-26103: Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
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).
Activity
chnlior commentedon Dec 21, 2017
According to the c code in Include/descrobject.h
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 bpo-26103 opened by @aaron Hall.
[-]inspect.isdatadescriptor fasle negative[/-][+]inspect.isdatadescriptor false negative[/+]corona10 commentedon Jun 10, 2018
@serhiy Storchaka
This issue can be closed due to PR 1959