Why You Should Use Python Decorator

codeforests
5 min readAug 7, 2020
<span>Photo by <a href=”https://unsplash.com/@wsheng1011?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCo
Photo by Han Wei Sheng on Unsplash

Introduction

Decorator is one of the very important features in Python, and you may have seen it many places in Python code, for instance, the functions with annotation like @classmethod, @staticmethod, @property etc. By definition, decorator is a function that extends the functionality of another function without explicitly modifying it. It makes the code shorter and meanwhile improve the…

--

--

codeforests

Resources and tutorials for python, data science and automation solutions