Created
April 16, 2015 11:53
-
-
Save ssbb/085642edb2fd060bac84 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 Base(object): | |
def process(self, s=''): | |
return s | |
class M1(object): | |
def process(self, *args, **kwargs): | |
s = super(M1, self).process(*args, **kwargs) | |
s += '_1_' | |
return s | |
class M2(object): | |
def process(self, *args, **kwargs): | |
s = super(M2, self).process(*args, **kwargs) | |
s += '_2_' | |
return s | |
class M3(object): | |
def process(self, *args, **kwargs): | |
s = super(M3, self).process(*args, **kwargs) | |
s += '_3_' | |
return s | |
class App(M3, M2, M1, Base): | |
pass | |
app = App() | |
print(app.process()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment