标签:elf 问题 odi auth val date import .sh python 类
# _*_ coding: utf-8 _*_
__author__ = ‘pythonwu‘
__date__ = "2018/7/2 14:50"
class A():
def getValue(self):
print(‘return value of A ‘)
def show(self):
print(‘I can show A‘)
class B(A):
def getValue(self):
print(‘return value of B‘)
class C(A):
def getValue(self):
print(‘return value of C‘)
def show(self):
print(‘I can show C‘)
class D(B,C):
pass
d = D()
d.show()
d.getValue()
from pprint import pprint
pprint(D.mro())
I can show C
return value of B
[<class ‘__main__.D‘>,
<class ‘__main__.B‘>,
<class ‘__main__.C‘>,
<class ‘__main__.A‘>,
<class ‘object‘>]
标签:elf 问题 odi auth val date import .sh python 类
原文地址:https://www.cnblogs.com/wudeng/p/9254201.html