---
title: "Discussion on \"How does the wraps' function of the functools.py module work?\" | Hashnode"
description: "Discussion on \"How does the wraps' function of the functools.py module work?\". I came across the following code snippet in Python:\ndef log_function(argument):\n    def decorator_factory(func):\n        @functools.wraps(func)\n        def handler_decorator(*args, **kwargs):\n            time_start = time()        \n            print(..."
url: "https://hashnode.com/posts/how-does-the-wraps-function-of-the-functoolspy-module-work/616b26edb636526db5f484a3"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How does the wraps' function of the functools.py module work?](https://tarvamind.hashnode.dev/how-does-the-wraps-function-of-the-functoolspy-module-work?utm_source=hashnode&utm_medium=feed)

I came across the following code snippet in Python: def log\_function(argument): def decorator\_factory(func): @functools.wraps(func) def handler\_decorator(\*args, \*\*kwargs): time\_start = time() print(...

Oct 16, 2021 · 2 min read · tarvamind.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#functions](https://hashnode.com/tag/functions)

## Written by

[Talvane Augusto](https://hashnode.com/@talvane)

@talvane

  
[View profile](https://hashnode.com/@talvane)

Never destroy your dreams, destroy your fears.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
