summaryrefslogtreecommitdiffstats
path: root/src/back/generator.py
blob: 851149b18b0472df166ebbcfb39a9e6e47f5f241 (plain) (blame)
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