---
title: "Discussion on \"Python Decorator Template\" | Hashnode"
description: "Discussion on \"Python Decorator Template\". without arguments\nfrom functools import wraps\n\ndef decorate(func):\n\n    @wraps(func)\n    def wrapper(*args, **kwargs):\n        # some actions before func\n        # ...\n        _r = func(*args, **kwargs)\n        # some actions after func\n        # ......"
url: "https://hashnode.com/posts/python-decorator-template/609d19a2b684eb4cd52c3d93"
---

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

Discussion

# [Python Decorator Template](https://ywyt738.hashnode.dev/python-decorator-template?utm_source=hashnode&utm_medium=feed)

without arguments from functools import wraps def decorate(func): @wraps(func) def wrapper(\*args, \*\*kwargs): # some actions before func # ... \_r = func(\*args, \*\*kwargs) # some actions after func # ......

May 13, 2021 · 1 min read · ywyt738.hashnode.dev  
Read the article

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

## Written by

[OmegaPhi](https://hashnode.com/@ywyt738)

@ywyt738 · Shanghai,China

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

DevOps

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
