summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-03 09:09:02 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-03 09:09:02 (GMT)
commite59e2bab8fe0fc3d20e815ac0f9b83d361d0d715 (patch)
tree1ceec154b81d1404ebe43a37d9758df8d1c3380a /Lib/pydoc.py
parente86a59af886d6c0f58f53e42878a25e48627fed1 (diff)
downloadcpython-e59e2bab8fe0fc3d20e815ac0f9b83d361d0d715.zip
cpython-e59e2bab8fe0fc3d20e815ac0f9b83d361d0d715.tar.gz
cpython-e59e2bab8fe0fc3d20e815ac0f9b83d361d0d715.tar.bz2
Patch #711902: Cause pydoc to show data descriptor __doc__ strings.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 7f0addd..8e5064a 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -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