Skip to content

Instantly share code, notes, and snippets.

@sekimura
Created March 16, 2012 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sekimura/2053299 to your computer and use it in GitHub Desktop.
Save sekimura/2053299 to your computer and use it in GitHub Desktop.
class MyMixin():
x = 10
y = 20
class Bar(object):
def xy(self):
return "x %s y %s" % (self.x, self.y)
class Foo(Bar, MyMixin):
pass
f = Foo()
print f.xy()
print Foo.x
print Foo.y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment