On 12 February 2015 at 05:42, Martin Teichmann <lkb.teichmann@gmail.com> wrote:
With my addition, one could simply add a method
to MetaRegistrar:

def __add__(self, other):
    class Combination(self, other):
    return Combination

Having recently had to refactor some code in IPython which used multiple inheritance and metaclasses, -1 to this idea.

1. More magic around combining metaclasses would make it harder to follow what's going on. Explicit (this has a metaclass which is a combination of two other metaclasses) is better than implicit (this has a metaclass which can combine itself with other metaclasses found from the MRO).
2. I *want* it to be hard for people to write multiple-inheriting code with multiple metaclasses. That code is most likely going to be a nightmare for anyone else to understand, so I want the person creating it to stop and think if they can do it a different way, like using composition instead of inheritance.