So lets say I've got a function:
def print_something(a, b, c='something', d='something else'):
print '{}/{}/{}/{}'.format(a, b, c, d)
And I've got this method:
def print_method(self, a, b):
if self.c and self.b:
print_something(a, b, self.c, self.d)
elif self.c:
print_something(a, b, c=self.c)
elif self.d:
print_something(a, b, d=self.d)
else:
print_something(a, b)
Is there a way to get the same functionality as print_method() without having to provide an if for each possible combination of self.c and self.d?