class Thing: allThings = set() def __init__(self): self.networkId = None self.id = None self.type = None self.modelUrl = None Thing.Add(self) def update(self, currentTime): pass @staticmethod def Add(thing): thing.id = len(Thing.allThings) Thing.allThings.add(thing) def UpdateAll(currentTime): for thing in Thing.allThings: thing.update(currentTime)