[Python-checkins] CVS: python/dist/src/Lib pydoc.py,1.53,1.54

Tim Peters tim_one@users.sourceforge.net
Wed, 26 Sep 2001 21:08:18 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv28135/python/Lib

Modified Files:
	pydoc.py 
Log Message:
docroutine() (both instances):  Docstrings for class methods weren't
getting displayed, due to a special case here whose purpose I didn't
understand.  So just disabled the doc suppression here.

Another special case here skips the docs when picking apart a method
and finding that the im_func is also in the class __dict__ under
the same name.  That one I understood.  It has a curious consequence,
though, wrt inherited properties:  a static class copies inherited stuff
into the inheriting class's dict, and that affects whether or not this
special case triggers.  The upshoot is that pydoc doesn't show the
function docstrings of getter/setter/deleter functions of inherited
properties in the property section when the class is static, but does
when the class is dynamic (bring up Lib/test/pydocfodder.py under
GUI pydoc to see this).


Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** pydoc.py	2001/09/27 03:29:51	1.53
--- pydoc.py	2001/09/27 04:08:16	1.54
***************
*** 760,764 ****
                  if imclass is not cl:
                      note = ' from ' + self.classlink(imclass, mod)
-                     skipdocs = 1
              else:
                  if object.im_self:
--- 760,763 ----
***************
*** 1118,1122 ****
                  if imclass is not cl:
                      note = ' from ' + classname(imclass, mod)
-                     skipdocs = 1
              else:
                  if object.im_self:
--- 1117,1120 ----