scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
docformat(docstring, docdict=None)

Adapt the indent of the inserted docs

Parameters

docstring : string

docstring from function, possibly with dict formatting strings

docdict : dict, optional

dictionary with keys that match the dict formatting strings and values that are docstring fragments to be inserted. The indentation of the inserted docstrings is set to match the minimum indentation of the docstring by adding this indentation to all lines of the inserted string, except the first.

Returns

outstring : string

string with requested docdict strings inserted

Fill a function docstring from variables in dictionary

Examples

>>> docformat(' Test string with %(value)s', {'value':'inserted value'})
' Test string with inserted value'
>>> docstring = 'First line\n    Second line\n    %(value)s'
... inserted_string = "indented\nstring"
... docdict = {'value': inserted_string}
... docformat(docstring, docdict) 'First line\n Second line\n indented\n string'
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy._lib.doccer.docformat

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/_lib/doccer.py#10
type: <class 'function'>
Commit: