R. David Murray added the comment:

They use isinstance, except for a couple that also check co_flags, and the ones 
that check if the object is a descriptor.  I haven't thought this through 
fully, but I think this means that in general the descriptor protocol has been 
invoked or not by the caller of inspect before inspect checks the object.  
There is no 'callable' type in python, so the closest analog in the inspect 
module to 'callable' are the functions that look for __get__ and __set__ 
methods on descriptors.  If one of *those* is a descriptor, my head will start 
hurting :).

----------

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

Reply via email to