Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
 
PREVIOUS NEXT
Tagged: #python #decorator
ADD COMMENT
Topic
Name
2+2 =