AaronWard / covidify

Covidify - corona virus report and dataset generator for python 📈 [no longer being updated]
MIT License
446 stars 113 forks source link

Applying a creational design pattern in data_prep.py #92

Closed smanveer closed 3 years ago

smanveer commented 3 years ago

A creational design pattern( singleton) is applied here so as to limit the instances and avoid getting bugs due to multiple instances. A class SingletonGovt is created which has a private object instance and is initialized. The constructor is making sure no more than one instance can be created.