---
title: "Discussion on \"What is decorator in python\" | Hashnode"
description: "Discussion on \"What is decorator in python\". As a developer best way to write code within a function or class. but what if our code enter in function and return exception error. Decorator is function which validate the passing parameter in function. if parameter is valid then code enter in the ..."
url: "https://hashnode.com/posts/what-is-decorator-in-python/612f6d97c21ac123ca3772fb"
---

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

Discussion

# [What is decorator in python](https://jaypratap.hashnode.dev/what-is-decorator-in-python?utm_source=hashnode&utm_medium=feed)

As a developer best way to write code within a function or class. but what if our code enter in function and return exception error. Decorator is function which validate the passing parameter in function. if parameter is valid then code enter in the ...

Sep 1, 2021 · 1 min read · jaypratap.hashnode.dev  
Read the article

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

## Written by

[Jay pratap](https://hashnode.com/@jaypratap)

@jaypratap

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

Python Developer

Python Developer | Machine Learning | Django |

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
