python decorator

Python Decorator

This is a quick tutorial on the Decorator pattern in Python. You probably need some basic Python to follow along, but I will try to keep it simple.

The decorator pattern in programming, no matter the language, is all about adding functionality or behaviour to something else. It can be used in the data sense where I have a lot of data and I want to decorate the data with a new column. I could also have an Object and I want to add new functionality to that object without affecting the current behaviour of that object. Now would it not be great if we could wrap functionality around an existing object? Well that is exactly what the python decorator does.
Read More…

By clicking Dismiss you accept that you may get a cookie that is used to improve your user experience and for analytics.
All data is anonymised. Our privacy page is here =>
Privacy Policy
This message is required under GDPR (General Data Protection Rules ) and the ICO (Information Commissioners Office).