chemtools.utils.utils.doc_inherit

chemtools.utils.utils.doc_inherit(base_class)[source]

Docstring inheriting method descriptor.

doc_inherit decorator

Usage:

class Foo(object):
    def foo(self):
        "Frobber"
        pass

class Bar(Foo):
    @doc_inherit(Foo)
    def foo(self):
        pass

Now, Bar.foo.__doc__ == Bar().foo.__doc__ == Foo.foo.__doc__ == "Frobber"