Which functools helper preserves a wrapped function's name and docstring in a decorator in Python?
Correct answer
D. functools.wraps
D. functools.wraps
@wraps(func) copies metadata such as __name__ and __doc__ to the wrapper.
Asked in: Python Interview Advanced Python
https://docs.python.org/3/library/index.htmlNot sure why the answer is D? Ask here and get an explanation.