This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: pydoc: check bases for doc strings?
Type: enhancement Stage:
Components: Library (Lib) Versions:
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: ping Nosy List: calvin, ping, skip.montanaro
Priority: low Keywords:

Created on 2001-05-23 20:18 by skip.montanaro, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg4841 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2001-05-23 20:18
Given the following class hierarchy:

class A:
  def foo(self):
    "do the foo"

class B(A):
  def foo(self):

class C(B):
  def foo(self):
    "do the foo in C"

if you ask pydoc for help about A or C you will get the
corresponding doc string.  If you ask for help about B,
however, you see no documentation.  Would be kinda nice
if displayed "do the foo" as the doc
string for
msg4842 - (view) Author: Bastian Kleineidam (calvin) Date: 2001-05-28 16:34
Logged In: YES 

No, please dont do this, IMO its the wrong way. is different from, so it needs
a different doc string.
Just imagine I document with "do the foo in A",
then your scheme is not working.

msg4843 - (view) Author: Ka-Ping Yee (ping) * (Python committer) Date: 2001-08-11 20:36
Logged In: YES 

I agree with Calvin.  (I remember considering this and designing it not to work this way.)  In your example, does nothing, so it shouldn't be documented as doing what does.  There's a link to the base class provided if you want to find out what the base class does.
Date User Action Args
2022-04-10 16:04:04adminsetgithub: 34536
2001-05-23 20:18:01skip.montanarocreate