]> granicus.if.org Git - python/commit
SF bug [#472347] pydoc and properties.
authorTim Peters <tim.peters@gmail.com>
Thu, 18 Oct 2001 19:56:17 +0000 (19:56 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 18 Oct 2001 19:56:17 +0000 (19:56 +0000)
commit8dd7adeb34cdbbb7b3b95ab502699d08b7ba328c
treea77d551a385ea6301ef5d9fd8dd4bbfcc37bd2eb
parenta6535fd40b7220350d007b1dcab3fbccaa6a3092
SF bug [#472347] pydoc and properties.
The GUI-mode code to display properties blew up if the property functions
(get, set, etc) weren't simply methods (or functions).

"The problem" here is really that the generic document() method dispatches
to one of .doc{routine, class, module, other}(), but all of those require
a different(!) number of arguments.  Thus document isn't general-purpose
at all:  you have to know exactly what kind of thing is it you're going
to document first, in order to pass the correct number of arguments to
.document for it to pass on.  As an expedient hack, just tacked "*ignored"
on to the end of the formal argument lists for the .docXXX routines so
that .document's caller doesn't have to know in advance which path
.document is going to take.
Lib/pydoc.py
Lib/test/pydocfodder.py