Task: Understanding and Demonstrating functools.wraps in Python
Task: Understanding and Demonstrating functools.wraps in Python: a task in Terminal-Lego-15k (Harbor dataset). When creating decorators in Python, the decorated function loses its original metadata (like name , doc , and module ). The functools.wraps decorator is used to preserve this metadata…
The task
When creating decorators in Python, the decorated function loses its original metadata (like `__name__`, `__doc__`, and `__module__`). The `functools.wraps` decorator is used to preserve this metadata. Your task is to understand and demonstrate what `functools.wraps` does.
Part of PrimeIntellect/Terminal-Lego-15k.