diff options
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 0716a3a..78b00e7 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -754,7 +754,7 @@ class HTMLDoc(Doc): push(msg) for name, kind, homecls, value in ok: base = self.docother(getattr(object, name), name, mod) - if callable(value) or inspect.isdatadescriptor(value): + if hasattr(value, '__call__') or inspect.isdatadescriptor(value): doc = getattr(value, "__doc__", None) else: doc = None @@ -1169,7 +1169,7 @@ class TextDoc(Doc): hr.maybe() push(msg) for name, kind, homecls, value in ok: - if callable(value) or inspect.isdatadescriptor(value): + if hasattr(value, '__call__') or inspect.isdatadescriptor(value): doc = getdoc(value) else: doc = None |