Advertisement
SepandMeenu

MRO problem in Python

Nov 27th, 2020
967
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. # MRO problem in Python
  2.  
  3. class A:
  4.     def foo(self):
  5.         print("A::foo called")
  6.  
  7. class B(A):
  8.     def foo(self):
  9.         print("B::foo called")
  10.  
  11. class C(A, B):
  12.     pass
  13.  
  14. c0 = C()
  15. c0.foo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement