def mixer(*args):
    """Decorator for mixing mixins"""

def inner(cls):
    for a, k in ((a, k) for a in args for k, v in list(vars(a).items()) if
        callable(v)):
        setattr(cls, k, getattr(a, k).__func__)
return cls
return inner


class Mixin(object):

    def b(self):
        print('b()')

def c(self):
    print('c()')


class Mixin2(object):

    def d(self):
        print('d()')

def e(self):
    print('e()')


@mixer(Mixin, Mixin2)
class Foo(object):

    def a(self):
        print('a()')
f = Foo()
f.a()
f.b()
f.c()
f.d()
f.e()
print(issubclass(Foo, Mixin))
In Python can one implement mixin behavior without using inheritance?