I'm not sure that's really sensible style, tho - classes that are intended
to be used as mixins should call super, and the base class should be the
last in the hierarchy.
class FooMixin(object):
def __init__(self):
super(FooMixin, self).__init__()
self.foo =
It matters if you're going to mixin a class whose common ancestor is
object, e.g.:
class FooMixin(object):
def __init__(self):
self.foo = 3
class MyModel(models.Model, FooMixin):
pass
if models.Model.__init__ doesn't call super().__init__, then
FooMixin.__init__ won't be
Calling super in base classes (ie anything that inherits from 'object')
just seems unnecessary and obscure to me. It's not a pattern I use or have
seen, and after playing around a bit I can't see any sensible case where
it'd make a difference. `View` should always be the last (right-most)