DaSunWarman的ChinaUnix博客
DaSunWarman
全部博文(22)
2018年(12)
2017年(10)
damofeix
ghwj
hffan
wb123456
hubeisun
格伯纳
grjboy30
tomcodin
拾忆1765
分类: Python/Ruby
2017-11-20 17:23:58
class father(): def call_children(self): child_method = getattr(self, 'out')# 获取子类的out()方法 child_method() # 执行子类的out()方法class children(father): def out(self): print "hehe"child = children()child.call_children()
上一篇:git apply -v 提示 Skipped patch 打不上patch的解决办法
下一篇:Python进程间通信,使用multiprocessing.connection的Listener和Client实现
登录 注册