python2.7
# coding=utf-8 class Base: class_name = 'base' def method(self): print "Base!" print self.class_name class BaseB: class_name = 'base_b' def method(self): print "BaseB!!!!" print self.class_name class Hoge(Base, BaseB): class_name = 'hoge' class Fuga(BaseB, Base): class_name = 'fuga' hoge = Hoge() hoge.method() # -> Base! # -> hoge fuga = Fuga() fuga.method() # -> BaseB!!!! # -> fuga