python decorator 2aargs 2a 2akwargs

Solutions on MaxInterview for python decorator 2aargs 2a 2akwargs by the best coders in the world

showing results for - "python decorator 2aargs 2a 2akwargs"
Soren
15 Oct 2017
1from functools import wraps
2
3def my_decorator(f):
4    @wraps(f)
5    def wrapper(*args, **kwargs):
6        print('Calling decorated function')
7        return f(*args, **kwargs)
8    return wrapper