Skip to content

Instantly share code, notes, and snippets.

@omarjcero
Created July 22, 2021 20:08
Show Gist options
  • Save omarjcero/c95afa6ab972b55a1491d04c21ee5246 to your computer and use it in GitHub Desktop.
Save omarjcero/c95afa6ab972b55a1491d04c21ee5246 to your computer and use it in GitHub Desktop.
# Write Python 3 code in this online editor and run it.
class SomeAbstraction:
pass # lots of stuff - but missing something
class Mixin1:
def something(self):
pass # one implementation
def show(self):
print("AAAAAAAAAAA")
pass
class Mixin2:
def something(self):
pass # another
def show(self):
print("BBBBBBBBBBB")
pass
class Concrete1(Mixin1, Mixin2 ):
def show(self):
print("fdshdsjhdfhjk")
Mixin1.show(self)
Mixin2.show(self)
pass
class Concrete2(SomeAbstraction, Mixin2):
pass
print("fdsfdsfds")
obj = Concrete1()
obj.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment