10.02经典类的bug

#以下在python 3.6版本里已没有这个问题了
1class A:
def _init__(self):
print ("this is A")
def save(self):
print ("save metho from A")

class B(A):
def _init__(self):
print ("this is B")

class C(A):
def _init__(self):
print ("this is C")
def save(self):
print ("save metho from C")

class D(B,C):
def _init__(self):
print ("this is D")

D1 = D()
D1.save() #旧的python版本里会显示为"save metho from A",python 3.0开始,没有旧式(经典)类了,也已修改了这个bug
原文地址:https://www.cnblogs.com/liulvzhong/p/7620343.html