class Dog(Animal):
    pass


class Cat(Animal):
    pass


class TalkMixin(object):

    def talk(self):
        print('I talk like a {0}'.format(self.__class__.__name__))
if __name__ == '__main__':
    pass
Is there a way to create subclasses on-the-fly?