[Python-ideas] inheriting docstrings and mutable docstings for classes

Nick Coghlan ncoghlan at gmail.com
Fri Jun 10 09:07:47 CEST 2011

On Fri, Jun 10, 2011 at 5:04 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Nick Coghlan wrote:
>> -1. Subclasses are not the same thing as the original class so
>> docstring inheritance should be requested explicitly.
> The docstring of the class itself probably shouldn't be
> inherited automatically. But if you override a method
> without changing the API or user-visible behaviour, the
> inherited docstring still applies.

I believe Eric created a class decorator recipe on the cookbook site
that does exactly that for methods without their own docstrings.


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-ideas mailing list