We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d84c78b commit b477553Copy full SHA for b477553
diamond.py
@@ -0,0 +1,28 @@
1
+# diamond shape problem in multiple inheritance in python
2
+
3
4
+class A:
5
+ def met(self):
6
+ print("This is a method from class A")
7
8
9
+class B(A):
10
11
+ print("This is a method from class B")
12
13
+class C(A):
14
15
+ print("This is a method from class C")
16
17
18
+class D(B,C):
19
20
+ print("This is a method from class D")
21
22
23
+a = A()
24
+b = B()
25
+c = C()
26
+d = D()
27
28
+d.met()
0 commit comments