how to inherit docstrings?

Ben Finney ben+python at benfinney.id.au
Thu Jun 9 19:23:49 EDT 2011


Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:

> IMO, it shouldn't be necessary to explicitly copy docstrings around
> like this in the first place. Either it should happen automatically,
> or help() should be smart enough to look up the inheritance hierarchy
> when given a method that doesn't have a docstring of its own.

Since the docstrings are useful in more places than just ‘help’, I'm +1
on having docstrings be automatically inherited if not specified.

Would the OP like to propose this on ‘python-ideas’?

-- 
 \        “Odious ideas are not entitled to hide from criticism behind |
  `\          the human shield of their believers' feelings.” —Richard |
_o__)                                                         Stallman |
Ben Finney



More information about the Python-list mailing list