I have a function with two optional parameters:
def func(a=0, b=10): return a+b
Somewhere else in my code I am doing some conditional a
Why not pass that logic to the function?
def func(a, b): a = a or 0 b = b or 10 return a + b