What is the output of the following code? from functools import wraps def decorator_func(func): @wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper @decorator_func def square(x): return x**2 print(square.__name__)
What is the output of the following code?
from functools import wraps
def decorator_func(func):
@wraps(func)
def wrapper(*args, **kwargs):
return func(*args, **kwargs)
return wrapper
@decorator_func
def square(x):
return x**2
print(square.__name__)
a. Error
b. wrapper
c. decorator_func
d. square