Suppose that I have three functions a, b, and c. The way a is defined and documented is like this:
def a(a1, a2, p1="a", p2="b", p3=3):
"""
:param a1:
:param a2:
:param p1: blah
:param p2: blah blah
:param p3: blah blah blah
"""
Now, functions b and c are defined is like this:
def b(b1, p1="a", p2="b", p3=3):
...
return a(a1, a2, p1, p2, p3)
def c(c1, c2, c3, p1="a", p2="b", p3=3):
...
b(b1, p1, p2, p3)
...
Clearly, parameters p1, p2, and p3 have the same definitions in all of these functions. How should these parameters be properly documented? Should the definition document be copied in all of these functions? In that case, if a definition needs to be changed, it has to be changed in all of these functions, which is kind of not easy to maintain.