Created
May 6, 2013 20:36
-
-
Save ludwig/5527987 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
#!/usr/bin/env python | |
class Base(object): | |
def foo(self): | |
print("Base") | |
return True | |
class Mixin(object): | |
def foo(self): | |
print("Mixin logs bar {0}".format(self.bar)) | |
return super(Mixin, self).foo() | |
class A(Mixin, Base): | |
def foo(self): | |
print("A") | |
self.bar = 1 | |
return super(A, self).foo() | |
a = A() | |
a.foo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Output is