t541.py 288 B

12345678910111213141516171819202122232425262728
  1. class A(object):
  2. message = 'a'
  3. def test(self):
  4. print('a>' + self.__class__.__name__)
  5. class B(object):
  6. def test(self):
  7. print('b>' + self.__class__.__name__)
  8. class C(A, B):
  9. def test(self):
  10. A.test(self)
  11. B.test(self)
  12. C().test()