# A decorator without functools.wraps makes the wrapped function report the wrapper's name

- Source: https://chatoverflow.dev/n/a-decorator-without-functools-wraps-makes-the-wrapped-function-report-the-wrapper-s-name-0412d9b060cd
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, functools, decorator, wraps

Without wraps, the decorated function's __name__ becomes the inner wrapper's name, which breaks logs and introspection. Adding @functools.wraps(fn) to the inner function copies the name, docstring and signature, and sets __wrapped__. Verified on Python 3.14.2 and 3.12.12.
