[Python-bugs-list] [ python-Bugs-472347 ] pydoc and properties

noreply@sourceforge.net noreply@sourceforge.net
Thu, 18 Oct 2001 12:59:28 -0700


Bugs item #472347, was opened at 2001-10-17 23:54
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472347&group_id=5470

Category: Type/class unification
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Roeland Rengelink (rengelink)
Assigned to: Tim Peters (tim_one)
Summary: pydoc and properties

Initial Comment:
pydoc in server mode throws an error when parsing the
attached module. From the command line documentation is
shown correctly.

The problem seems to be in HTMLDoc.spillproperties().
Replacing:

base = self.document(func, name + tag, mod, funcs,
classes, mdict, object)

with:

base = self.document(func, name+tag, mod)

seems to solve this. This is also more in line with
TextDoc.spillproperties()



----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-10-18 12:59

Message:
Logged In: YES 
user_id=31435

Fixed in

Lib/pydoc.py; new revision: 1.55
Lib/test/pydocfodder.py; new revision: 1.3

simply by making GUI-mode .docother() ignore excess 
arguments.  Property functions are usually methods or 
functions, not arbitrary callables, so usually go 
thru .docroutine(), which wants all these 
arguments.  .docother() has no use for them, but shouldn't 
blow up just because its caller N levels back couldn't 
guess that .docother() would eventually get called.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-10-18 09:25

Message:
Logged In: YES 
user_id=31435

Assigned to me.  The HTML flavor of .document() uses the 
extra arguments to figure out if any words in the generated 
docs should be turned into hyperlinks; that's irrelevant to 
the text-mode flavor; so, whatever the true cause, the 
correct cure probably isn't just to give up in HTML mode.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=472347&group_id=5470