self._dolock()

def onemore(self):
    self.mistakes += 1
print(self.mistakes)

def reset(self):
    self.mitsakes = 0
x = Example()
for i in range(3):
    x.onemore()
x.reset()
What's the pythonic way of declaring variables?