文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>python多重继承

python多重继承

时间:2011-04-26  来源:孤独的猫

class A():
    _a = 1

    def Afun(self):
        print 'A'

    def Common(self):
        print 'A-common'        

class A1():    
    def Common(self):
        print 'A1-common'   
        
class B(A,A1):
    _b = 2
    def Bfun(self):
        print 'B'

b = B()

b.Common()
可在http://codepad.org中进行在线调试;或http://ideone.com ; http://kodingen.com/
相关阅读 更多 +
排行榜 更多 +
射击吧

射击吧

飞行射击 下载
爆射护卫队

爆射护卫队

飞行射击 下载
灭绝之战

灭绝之战

飞行射击 下载