[Patches] [ python-Patches-1038909 ] pydoc method documentation lookup enhancement

SourceForge.net noreply at sourceforge.net
Tue Oct 12 06:14:51 CEST 2004


Patches item #1038909, was opened at 2004-10-02 02:39
Message generated for change (Comment added) made by isandler
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1038909&group_id=5470

Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Alexander Schmolck (aschmolck)
Assigned to: Nobody/Anonymous (nobody)
Summary: pydoc method documentation lookup enhancement

Initial Comment:
If a method has no docstring, then pydoc.getdoc
currently just looks for a comment or returns nothing.
A more sensible behavior IMO would be if pydoc tried to
get the docstring from the same method in a baseclass
(in mro), if it exists.

This ought to be "the right thing" (i.e. by the
semantics of inheritance if the documentation of a
overriden method is not overriden it should still
present the same interface to the user) and the current
behavior is a royal pain when working with backends or
other types of subclasses that are derived from some
abstract class that contains all the interface docs.

Currently even fixing up docstrings by hand is not
simple, because the straightforward
``Child.meth.__doc__ = Parent.meth.__doc__`` fails (one
has to go directly via the .__dict__ which is problematic).

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

Comment By: Ilya Sandler (isandler)
Date: 2004-10-11 21:14

Message:
Logged In: YES 
user_id=971153


Did you forget to attach the patch?

(SF does not show any attachments)

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1038909&group_id=5470


More information about the Patches mailing list