Geek Culture
Published in

Geek Culture

12 Ways to Use Function Decorators to Improve Your Python Code

Applying separation of concerns, the easy way.

Photo by pine watt on Unsplash

Python decorators provide a simple way to modify or enhance existing functions. They are often used to add extra steps before or after a function in executed, which can be useful in many scenarios. There are other ways to use them too.




A new tech publication by Start it up (

Recommended from Medium

HackerRank Problem : 2D Array - DS

Data Wrangling Essentials in Python

Symfony 2.8 Jobeet Day 9: The Functional Tests

Introduction of MVC(Part-I)

Dart: What are mixins?

🌎Vero Farm Around The Globe🌎

Learning Docker while Creating an Express MongoDB Template

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Martin McBride

Martin McBride

Software developer. Java, Python, C++ etc. I write for and maintain the generativepy library.

More from Medium

Class or Static Variables in Python

WebSockets In Python FastAPI — Fetching Data At Super Speed

8 Game-Changing PyCharm Plugins You Absolutely Need

How To Develop, Package and Distribute a Python Library