What is the name for this kind of design pattern in Python, where you sequentially call functions whose outputs are inputs to the following functions?
Is this a good design-pattern? How can one avoid coupling between functions?
Example:
def main():
a = func_a(input_a)
b = func_b(a)
c = func_b(b)
def func_a(input_a):
# Do stuff
return output_a
def func_b(input_b):
# Do stuff
return output_b
def func_c(input_c):
# Do stuff
return output_c
if __name__ == ‘__main__’:
main()
Aucun commentaire:
Enregistrer un commentaire