Andy Harrington <[EMAIL PROTECTED]> added the comment:

HM, before writing my patch I tested pydoc to see the issue was still
there.  I did not look at the 2004 patch from aschmolck since it was so
old and was clearly not implemented, and brett just listed this issue as
one to deal with in 2008.  Now I see pydoc.py.PATCH does address the
same issue.

Comments on the differences:
1.  I allow for the case that an ancestor uses the name but not as a
method.  That *should* stop the search.

2.  The 2004 patch does not use inspect.ismethod, but creates its own test. 

3.  I stuck with the original pydoc convention that comments could
substitute for docs.  The 2004 patch does not look for comments in
ancestors and only uses comments in the current method if no ancestor
has docs.  That is a difference in design that could be discussed.  I am
OK with either.

4.  The 2004 patch makes its substitution silently.  I prefer explicitly
noting that the docs are 'inherited'.

5.  There is nothing to add to the test package in the 2004 patch.


Before looking at the 2004 patch, I replaced my last patch.  I just
reread the Python source and documentation conventions and changed names
and documentation to match.  

The only change to my previous comments is that 
test_pydoc_inheritance.regenerateData
was renamed
test_pydoc_inheritance.regenerate_data

One related comment after thinking about the style guides:  Should this
pydoc change affect the style guide?  Is duplication in the source code
recommended for 'inherited' docs?  Rather than say absolutely nothing in
the overriding method, would a standard comment 
#inherit docs
make sense in the source code?  In that case a further change to pydoc
is needed to recognize this as a special case, where the 'inherited'
docs should be substituted.  Alternately the search sequence followed in
the 2004 patch could be used, which would find the inherited docs before
the comment, whatever the comment.

Added file: http://bugs.python.org/file9834/pydoc2.PATCH

_____________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1038909>
_____________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to