This repository has been archived on 2022-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
ztm/params.py

18 lines
380 B
Python

class Params:
singleton = None
params = {
'active': False,
'done': False,
}
def __new__(cls, *args, **kwargs):
if not cls.singleton:
cls.singleton = object.__new__(Params)
return cls.singleton
def update(self, key, value):
self.params[key] = value
def get(self, key):
return self.params[key]