Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The Diamond Problem
class class_a(object):
def speak(self):
print("class_a sinifindan cagirildi")
class class_b(class_a, object):
def speak(self):
print("class_b sinifindan cagirildi")
super(class_b, self).speak()
class class_c(class_a, object):
def speak(self):
print("class_c sinifindan cagirildi")
super(class_c, self).speak()
class class_d(class_b, class_c, object):
def speak(self):
print("class_d sinifindan cagirildi")
super(class_d, self).speak()
my_class = class_d()
my_class.speak()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.