I am new to python-sphinx and cannot find anything referring to the following:
Suppose I have a function foo(a,b)and bar(a,c), so that the parameter ahas the same description for both functions.
Is it possible to document aonly once (in foo, say), and then copy this description to bar, to avoid the need to update both parts of the text if something achanges?
For example, let's say a document foo:
def foo(a,b,c):
"""
a function description.
:param a: a string, your name
:param b: something else
"""
Which would be great in the documentation bar, for example:
def bar(a,c)
"""
another function description.
:inheritParams foo a: # somehow inherits a description from foo
:param c: description for parameter c.
"""
even better if these were foo(a,b,d)and bar(a,c,d), and I could do (in the documentation bar):
:inheritParams foo:
:param c: description for parameter c
, foo bar, foo. , a d foo, (c).