class Robot(object): a = 1 def fun(self): Robot.a += 1 print Robot.a class Human(Robot): pass