statsmodels.tools.docstring_helpers.Appender#
- class statsmodels.tools.docstring_helpers.Appender(addendum, join='', indents=0)[source]#
A function decorator that will append an addendum to the docstring of the target function
This decorator is robust even if func.__doc__ is None (for example, if -OO was passed to the interpreter).
- Parameters:
Methods
__call__(func)Call self as a function.
Examples
Usage: construct an Appender with a string to be joined to the original docstring. An optional ‘join’ parameter may be supplied which will be used to join the docstring and addendum. e.g.
>>> add_copyright = Appender("Copyright (c) 2009", join=" ")
>>> @add_copyright ... def my_dog(has='fleas'): ... "This docstring will have a copyright notice appended to it." ... pass
Methods
Properties