Patch #711902: Cause pydoc to show data descriptor __doc__ strings.

This commit is contained in:
Martin v. Löwis 2003-05-03 09:09:02 +00:00
parent e86a59af88
commit e59e2bab8f
5 changed files with 43 additions and 2 deletions

View file

@ -686,7 +686,7 @@ class HTMLDoc(Doc):
push(msg)
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
if callable(value):
if callable(value) or inspect.isdatadescriptor(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
@ -1087,7 +1087,7 @@ class TextDoc(Doc):
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
if callable(value):
if callable(value) or inspect.isdatadescriptor(value):
doc = getattr(value, "__doc__", None)
else:
doc = None