smpl.doc

Simplified python code documentation.

append_doc(original)

Append doc string of original to target object.

append_plot(*args[, xmin, xmax])

Append a plot to a function.

append_str(txt)

insert_doc(original)

Inserts the docstring from passed function original in the target function docstring.

insert_eq()

Inserts the function and its parameters and an equal sign.

insert_latex()

Inserts latexed code of a oneline function.

insert_latex_eq()

Inserts latexed code of a oneline function with parameters.

insert_str(txt)

table(dic[, top, bottom, init, tabs])

Add dict= {'key': [values...]} to a simple reST table.

Functions

smpl.doc.append_doc(original)[source]

Append doc string of original to target object.

Parameters
originalclass or function

orignal.__doc__ is appended to the __doc__ of the target

Examples

>>> def ho():
...     '''Ho'''
...     print(ho.__doc__)
>>> @append_doc(ho)
... def hi():
...     '''Hi'''
...     print(hi.__doc__)
>>> hi()
HiHo
smpl.doc.append_plot(*args, xmin=- 5, xmax=5)[source]

Append a plot to a function.

smpl.doc.insert_doc(original)[source]

Inserts the docstring from passed function original in the target function docstring.

smpl.doc.insert_eq()[source]

Inserts the function and its parameters and an equal sign.

smpl.doc.insert_latex()[source]

Inserts latexed code of a oneline function.

smpl.doc.insert_latex_eq()[source]

Inserts latexed code of a oneline function with parameters.

smpl.doc.table(dic, top=True, bottom=True, init=True, tabs=1)[source]

Add dict= {‘key’: [values…]} to a simple reST table.