design – When should an argument be set to None in Python?


The focus of my question is on design.

If I have an argument that can be None and it is passed between several functions until finally being used, which function should treat it as a default argument?

For example, suppose the following code block:

def foo(a):
 b = # some code block to assign b
 return bar(a, b)

def bar(a, b):
 c = # some code block to assign c
 return baz(a, b, c)

def baz(a, b, c):
 return a + b + c

The default value should be set only in foo and all the other functions must expect the argument as mandatory (e.g., foo(a=None); bar(a, b); baz(a, b, c))? Or is there a better design?

And if type verification was needed, what is the most suitable function for this?