I am beginner to python and I am trying to create a Flask application which uses gevent of gunicorn.
I have a function which accepts a number of parameters.
say, main_function(A,B,C,D,E,F,G,H,I)
.
From this function, I have to call another function, function_one(A,B)
which calls another function from within, say function_two(A,B)
which in turn calls another function function_three(A,B
) and so on.
At one point it reaches a function_thirtythree
which should get the parameters C,D
along with A and B.
Now my question is, do I have to pass C and D to function_one which should then be passed to function_two, then to function_three and so on, only to be used at function_thirty three call ? Is there a better way of doing it ?
def function_thirtythree(A,B)
return A + B+ C + D
def function_three(A,B)
function_thirtythree(A,B)
def function_two(A,B):
function_three(A,B)
def function_one(A,B):
function_two(A,B)
def main_func(A,B,C,D,E,F,G,H,I):
function_one(A,B)