I understand that in python you can set a default value for an argument like this:
def func(self, arg='value'):
#somecode
I have a function that will take up to 16 arguments, so I wish to store them as a tuple. The problem is I want to set default values for some values of the tuple, but not the whole thing. Would setting the default tuple as
def func(self, values=('foo', 'bar', 'foobar')):
be overriden if I passed in a tuple that only has two values? If I do, for example:
func(('bar', 'foo')
values==('bar', 'foo'), not ('bar', 'foo', 'foobar'). Is there a workaround?