This is the example code used in my blogpost Python: Decorators in OOP, published in Towards Data Science, the top data science publication on Medium.
The blog post talks about decorators and walks through an example. The sample class in the post goes through several iterations as we increase its complexity.
The code here is the final result that is achieved in the article.
A single python script is present in this directory that contains the code for the example used in the blog post.
- Clone this repo
- Navigate to the this directory
- Execute the python script
Simply execute:
$ git clone https://github.com/Polaris000/BlogCode.git
$ cd PythonDecorators
$ python decorator_example.py
You can find me on medium here.