[Python-checkins] python/dist/src/Lib pydoc.py,1.62,1.63
gvanrossum@sourceforge.net
gvanrossum@sourceforge.net
Tue, 21 May 2002 13:56:17 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv13346
Modified Files:
pydoc.py
Log Message:
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.
Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** pydoc.py 7 Apr 2002 06:36:23 -0000 1.62
--- pydoc.py 21 May 2002 20:56:15 -0000 1.63
***************
*** 676,680 ****
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
! doc = getattr(value, "__doc__", None)
if doc is None:
push('<dl><dt>%s</dl>\n' % base)
--- 676,683 ----
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
! if callable(value):
! doc = getattr(value, "__doc__", None)
! else:
! doc = None
if doc is None:
push('<dl><dt>%s</dl>\n' % base)
***************
*** 1068,1072 ****
push(msg)
for name, kind, homecls, value in ok:
! doc = getattr(value, "__doc__", None)
push(self.docother(getattr(object, name),
name, mod, 70, doc) + '\n')
--- 1071,1078 ----
push(msg)
for name, kind, homecls, value in ok:
! if callable(value):
! doc = getattr(value, "__doc__", None)
! else:
! doc = None
push(self.docother(getattr(object, name),
name, mod, 70, doc) + '\n')