In python 3 I can use list expansion to dynamically inherit from multiple superclasses:
class Super1(object):
x = 1
class Super2(object):
y = 1
classes = [Super1, Super2]
class B(*classes):
pass
This lets me allow for runtime decisions about which mixin classes to add to the list of superclasses.
Unfortunately, the * expansion of the superclass list is a syntax error in python2. Is there a generally accepted way of choosing the list of superclasses at runtime