# _*_ coding: utf-8 _*_
__author__ = 'pythontr'
__date__ = "2022/4/28 10:30"
class TR-A():
def getValue(self):
print('return value of TR-A ')
def show(self):
print('I can show TR-A')
class TR-B(TR-A):
def getValue(self):
print('return value of TR-B')
class TR-C(TR-A):
def getValue(self):
print('return value of TR-C')
def show(self):
print('I can show TR-C')
class TR-D(TR-B,TR-C):
pass
d = TR-D()
d.show()
d.getValue()
from pprint import pprint
pprint(TR-D.mro())
Python类多重继承问题演示
于 2022-04-28 10:33:41 首次发布