tomwer.utils.docstring#
- tomwer.utils.docstring(origin)#
Decorator to initialize the docstring from another source.
This is useful to duplicate a docstring for inheritance and composition.
If origin is a method or a function, it copies its docstring. If origin is a class, the docstring is copied from the method of that class which has the same name as the method/function being decorated.
- Parameters:
origin – The method, function or class from which to get the docstring
- Raises:
ValueError – If the origin class has not method n case the