Skip to content

Instantly share code, notes, and snippets.

@ssbb
Created April 16, 2015 11:53
Show Gist options
  • Save ssbb/085642edb2fd060bac84 to your computer and use it in GitHub Desktop.
Save ssbb/085642edb2fd060bac84 to your computer and use it in GitHub Desktop.
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