强制执行父类下的__init__

两种方式:

 1、super(子类,self)__init__()

 2、子类.__init__(self)

推荐使用super

猜你喜欢

转载自www.cnblogs.com/jarrel/p/init.html
今日推荐