Super的用法

The world can be divided into four parts. My team, the other teams, my tools, the other's. AlphaGo 2.0 finished the public test with 50 Chinese and Korean player's lose of the games.

class A(object):
    def show(self):
        print('AAAAAA')
class B(A):
    def show(self):
        super(B,self).show()
        print('BBBBB')
class C(A):
    def show(self):
        super(C,self).show()
        print('CCCCC')

class D(B,C):
    def show(self):
        super(D,self).show()
d = D()
print(d.show())
Super的用法_第1张图片
封装、继承和多态

你可能感兴趣的:(Super的用法)