tr2023-robot/Container.py

17 lines
321 B
Python
Raw Normal View History

2023-03-25 09:33:33 +00:00
class Container:
instances = {}
def set(self, name, instance):
self.instances[name] = instance
def get(self, name):
if name not in self.instances:
return None
return self.instances[name]
def count(self):
return len(self.instances)
def getInstances(self):
return self.instances