Eryk Sun added the comment:

It looks like slot_tp_descr_get bypasses call_method in order to unset 
tp->tp_descr_get for descriptors that don't define __get__. I don't know where 
that's an issue. If a class doesn't define __get__, its tp_descr_get slot 
should already be NULL. 

That said, I don't see why it's calling _PyType_LookupId directly instead of 
lookup_maybe. Using lookup_maybe would bind __get__ if it's a descriptor, and 
we want that, no? Then slot_tp_descr_get wouldn't have to manually hack `self` 
into the call, which is wrong in this case.

----------
components: +Interpreter Core -ctypes
nosy: +eryksun
versions: +Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30469>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to