Let's say this is the signature of my function:
def foo(x,y,z=0):
.
.
When I want to use this function, how can I override the value of z without changing the function or the signature?
Let's say this is the signature of my function:
def foo(x,y,z=0):
.
.
When I want to use this function, how can I override the value of z without changing the function or the signature?
Just pass value explicitly.
def foo(x, y, z=0):
print z
foo(1,3)
>> 0 # default value
foo(1,2,5)
>> 5 # new value passed