【发布时间】:2017-02-22 15:06:35
【问题描述】:
class Parent01(object):
def foo(self):
print("Parent01")
pass
class Parent02(object):
def foo(self):
print("Parent02")
pass
class Child(Parent01,Parent02):
def foo(self):
print("Child")
super(Parent01, self).foo()
pass
c = Child()
c.foo()
输出:
Child
Parent02
为什么这里是输出Parent02?
【问题讨论】:
标签: python python-3.x