Serhiy Storchaka added the comment:

__code__ is not enough for quacking as a function. Different code can expect 
other function attributes (for example __name__, __qualname__ and __module__).

See also issue8488. inspect.isroutine() and inspect.ismethoddescriptor() return 
True for some descriptors, but they don't quack good enough for pydoc.

----------
nosy: +serhiy.storchaka

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

Reply via email to