Glossary: Python Beyond the Basics
wraps
Also written: functools.wraps, @wraps
A decorator used inside your own decorator that copies the original function's name and docstring onto the wrapper, so the decorated function still describes itself.
Glossary: Python Beyond the Basics
Also written: functools.wraps, @wraps
A decorator used inside your own decorator that copies the original function's name and docstring onto the wrapper, so the decorated function still describes itself.