super(类名, self)就是调用父类的函数,下面就是调用了父类的__setattr__函数
class opt(object):
def __init__(self, root):
super(opt, self).__setattr__('root_path', root)
super(类名, self)就是调用父类的函数,下面就是调用了父类的__setattr__函数
class opt(object):
def __init__(self, root):
super(opt, self).__setattr__('root_path', root)