I noticed some antipatterns.
First, he's using toString and not __str__
Code:
class Dog(Animal):
def __init__(self):
def __init__(self)
a = Animal()
print a
Note that __str__ is called automatically when you call print.
If he's using Python 3, then he should be using Python 3's super syntax:
Code:
class Dog(Animal):
def __init__(self, name):
super().__init__(name)
And if he was using Python 2 he should have been deriving his base classes from object:
Code:
class Animal(object):