#__author__ = 'DouYunQian' #coding = utf - 8 class Foo (): def f1 ( self ): print ( "F1" ) pass class D ( Foo ): def f1 ( self ): super ( D , self ). f1 () #这个可以执行父类的方法 print ( "D" ) obj = D () if isinstance ( obj , Fo
#coding=utf-8
class Foo():
def f1(self):
print("F1")
pass
class D(Foo):
def f1(self):
super(D,self).f1()#这个可以执行父类的方法
print("D")
obj=D()
if isinstance(obj,Foo):#
print("ok")
if issubclass(D, Foo):
print("D is Foo Sub")
obj.f1()