Skip to content

Instantly share code, notes, and snippets.

@moacirmoda
Last active December 17, 2018 19:33
Show Gist options
  • Save moacirmoda/8a848a18cfbbc20f62f881efe8cf9698 to your computer and use it in GitHub Desktop.
Save moacirmoda/8a848a18cfbbc20f62f881efe8cf9698 to your computer and use it in GitHub Desktop.
class Foo:
def bar(self):
print(1)
class Mixin:
def bar(self):
print(2)
class New(Foo, Mixin):
pass
a = New()
a.bar() # 1
class NewNew(Mixin, Foo):
pass
a = NewNew()
a.bar() # 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment