Created
June 28, 2012 15:59
-
-
Save tioover/3012170 to your computer and use it in GitHub Desktop.
mixin
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
class Base(object): | |
def foo(): | |
pass | |
class Mixin(object): | |
def bar(): | |
return foo() # 这样子可以吗? | |
# 还是说 | |
class Mixin(Base): | |
def bar(): | |
return foo() | |
class Cls(Mixin, Base): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment