Re: how to inherit docstrings?



Gregory Ewing <greg.ewing@xxxxxxxxxxxxxxxx> 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
.



Relevant Pages

  • Re: how to inherit docstrings?
    ... or helpshould be smart enough to look up the inheritance hierarchy ... on having docstrings be automatically inherited if not specified. ... Yeah, I'll do that. ... Ben Finney ...
    (comp.lang.python)
  • Re: how to inherit docstrings?
    ... On Thu, Jun 9, 2011 at 4:27 PM, Gregory Ewing ... Auto inheriting docstrings would be nice, ... like doctests and some DSLs. ...
    (comp.lang.python)