I have a function that can receive 3 arguments. Only X
is mandatory and I could write this function like
def foo(X, A=None, B=None):
pass
But I want to force the user to call this function passing explicitly the arguments
foo(X=1, A=2, B=3)
foo(1, 2, 3) # Error
Is it possible make a decorator for that?
@explicitarguments
def foo(X, A=None, B=None):
pass