#类也是对象,type创建类的类 def create_class(name): if name == "user": class User: def __str__(self): return "user" return User elif name == "company": class Company: def __str__(self): return "company" return Company #type动态创…
class Base(object): def __init__(self): print 'Base create' class childB(Base): def __init__(self): print 'creat B ', super(childB, self).__init__() class childA(childB,Base): def __init__(self): print 'creat A ', Base.__init__(self) if __name__=…