What is happening here in Python with OOPs while trying Diamond Shape problem
问题 I am learning OOPs with python. created below code to replicate the diamond shape problem in multiple inheritence. I am running the below code in jupyter notebook and output is generated at same. class parent: def __init__(self): self.a=2 self.b=4 def form1(self): print("calling parent from1") print('p',self.a+self.b) class child1(parent): def __init__(self): self.a=50 self.b=4 def form1(self): print('bye',self.a-self.b) def callchildform1(self): print("calling parent from child1") super()