87b6f87
1 2 3 4 5 6 7 8 9 10
class Register(object): __shared_state = {} count = 0 def __init__(self): self.__dict__ = self.__shared_state def new(self): self.count += 1 return self.count