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).

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 below” pass

Parameters:
addendumstr or None

String to append to the wrapped function’s docstring.

joinstr, optional

A string placed between the original docstring and the addendum. Default is “”.

indentsint, optional

Number of indents (4-space blocks) added to all lines of the addendum. Default is 0.

Methods

__call__(func)

Call self as a function.

Methods

Properties

addendum