#!/usr/bin/python
# Filename:mro.py
class P1:
def foo(self):
print 'called P1-foo'
class P2:
def foo(self):
print 'called P2-foo'
def bar(self):
print 'called P2-bar'
class C1(P1, P2):
pass
class C2(P1, P2):
def bar(self):
print 'called C2-bar()'
class GC(C1, C2):
pass
>>> from mro import * >>> gc = GC() >>> gc.foo() called P1-foo >>> gc.bar <bound method GC.bar of <mro.GC instance at 0xb77be2ac>> >>> gc.bar() called P2-bar >>>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有