Can pydoc/help hide the documentation for inherited class methods and attributes?
Posted
by EOL
on Stack Overflow
See other posts from Stack Overflow
or by EOL
Published on 2010-05-18T12:35:48Z
Indexed on
2010/05/18
12:41 UTC
Read the original article
Hit count: 250
When declaring a class that inherits from a specific class:
class C(dict):
added_attribute = 0
the documentation for C lists all the methods of dict
(either through help(C)
or pydoc
).
Is there a way to hide the inherited methods from the automatically generated documentation (the documentation string can refer to the base class, for non-overwritten methods)?
This would be useful: pydoc
lists the functions defined in a module after its classes. Thus, when the classes have a very long documentation, a lot of less than useful information is printed before the new functions provided by the module are presented, which makes the documentation harder to exploit (you have to skip all the documentation for the inherited methods until you reach something specific to the module being documented).
© Stack Overflow or respective owner