What functools.wraps restores when you decorate a function
A decorator replaces your function with a wrapper, so its name, docstring, and signature change. Here is exactly what functools.wraps copies back and how it records __wrapped__.
A decorator replaces your function with a wrapper, so its name, docstring, and signature change. Here is exactly what functools.wraps copies back and how it records __wrapped__.