On Thu, Jun 9, 2011 at 7:05 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On Fri, Jun 10, 2011 at 9:54 AM, Eric Snow <ericsnowcurrently@gmail.com> wrote:
I'm +1 on having __doc__ be inherited.
-1. Subclasses are not the same thing as the original class so docstring inheritance should be requested explicitly.
Yeah, this one was mostly auxiliary to my main concern, __doc__ mutability for classes. Other than doctests and documentation/help(), I haven't used docstrings for much so the idea of it did not seem like a big deal. I certainly find myself inheriting docstrings from my abstract base classes explicitly all the time so that help() will show the info that is still applicable.
Agreed that docstrings should be writeable after the fact, though (e.g. functions already work that way - functools.wraps wouldn't work otherwise).
Would this be a very controversial change? I ask because it's been this way since 2.2 and no one's changed it. Thanks. -eric
Cheers, Nick.
-- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia