I wonder if there are any good practices in python how to handle cases if I want to pass optional argument to function.
I have this function in class:
def gen(self, arg1, arg2, optional):
if optional exists do that:
print(optional)
else:
print(arg1, arg2)
What I can do right now is just handle that by if, but I don't think this is the best way to do that.