def initialize(self):
    self.initial_value = 1

def some_event(self):
    order(self.initial_value)
subclass_body_dict = {'initialize': initialize, 'some_event': some_event}
base_class = ParentA
MyCode = type('MyCode', (base_class,), subclass_body_dict)
Динамическое наследование в Python