Created
July 22, 2021 20:08
-
-
Save omarjcero/c95afa6ab972b55a1491d04c21ee5246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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