New issue 2865: types.MemberDescriptorType has wrong type https://bitbucket.org/pypy/pypy/issues/2865/typesmemberdescriptortype-has-wrong-type
Avram Lubkin: Affects 2.7 and 3.x ``` #!python >>>> import types >>>> >>>> class C: .... __slots__ = ('ivar',) .... >>>> type(C.__dict__['ivar']) <class 'member_descriptor'> >>>> >>>> types.MemberDescriptorType <class 'getset_descriptor'> ``` This is due to the implementation. In CPython types is defined like this, which seems to be the same code in pypy. ``` #!python def _f(): pass FunctionType = type(_f) MemberDescriptorType = type(FunctionType.__globals__) ``` It would be better to check a slot member's type instead. Not sure where is the right place to fix it, but I wanted to report it before I implemented a workaround. _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue