Answers for "python decorator *args **kwargs"

0

python decorator *args **kwargs

from functools import wraps

def my_decorator(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        print('Calling decorated function')
        return f(*args, **kwargs)
    return wrapper
Posted by: Guest on September-08-2020

Python Answers by Framework

Browse Popular Code Answers by Language