This commit is contained in:
chenyang
2022-06-29 14:35:08 +08:00
parent d8fbbb0fa3
commit f59a124e55
4 changed files with 31 additions and 11 deletions
+18
View File
@@ -0,0 +1,18 @@
def get_context():
if QrContext.instance is None:
QrContext.instance = QrContext()
return QrContext.instance
class QrContext():
instance = None
all_obj = {}
def get(self, key):
return self.all_obj.get(key)
def add(self, key, v):
self.all_obj.update({key: v})
def remove(self, key):
del self.all_obj[key]