Created
December 17, 2015 11:57
-
-
Save pauricthelodger/1172dbb901e72ae86c3d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class SomeMixin(object): | |
def func(self): | |
print("In Mixin") | |
print(self) | |
print(self.__class__) | |
super(SomeMixin, self).func() | |
class SomeOtherBaseClass(object): | |
def func(self): | |
print("In SomeOtherBaseClass") | |
print(self) | |
print(self.__class__) | |
def other_func(self): | |
print("Got here") | |
class SomeBaseClass(object): | |
def func(self): | |
print("In BaseClass") | |
print(self) | |
print(self.__class__) | |
def other_func(self): | |
print("Got here too") | |
class SomeObject(SomeMixin, SomeBaseClass): | |
"""pass""" | |
class SomeOtherObject(SomeMixin, SomeOtherBaseClass): | |
"""pass""" | |
so = SomeObject() | |
so.func() | |
so.other_func() | |
soo = SomeOtherObject() | |
soo.func() | |
soo.other_func() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment