Simple python inheritance

class Animal(object): def __init__(self, nlegs=4): print '__init__ Animal' self.nlegs = nlegs class Cat(Animal): def __init__(self, talk='meow'): print '__init__ Cat' self.talk = talk class Dog(Animal): def __init__(self, talk='woof'): print '__init__ Dog' self.talk = talk Why does my cat tom = Cat() not have an nlegs attribute? Should we explicitly call Animal.__init__() from within Cat.__init__, or should … Read more