Kaydet (Commit) 5e355b24 authored tarafından Guido van Rossum's avatar Guido van Rossum

In both spilldata() functions, pretend that the docstring for

non-callable objects is always None.  This makes for less confusing
output and fixes the problem reported in SF patch #550290.
üst 0a8d4d57
......@@ -675,7 +675,10 @@ TT { font-family: lucidatypewriter, lucida console, courier }
push(msg)
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
doc = getattr(value, "__doc__", None)
if callable(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
if doc is None:
push('<dl><dt>%s</dl>\n' % base)
else:
......@@ -1067,7 +1070,10 @@ class TextDoc(Doc):
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
doc = getattr(value, "__doc__", None)
if callable(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
push(self.docother(getattr(object, name),
name, mod, 70, doc) + '\n')
return attrs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment