<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 12 February 2015 at 05:42, Martin Teichmann <span dir="ltr"><<a href="mailto:lkb.teichmann@gmail.com" target="_blank">lkb.teichmann@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div id=":2ih" class="" style="overflow:hidden">With my addition, one could simply add a method<br>
to MetaRegistrar:<br>
<br>
def __add__(self, other):<br>
    class Combination(self, other):<br>
        pass<br>
    return Combination</div></blockquote></div><br>Having recently had to refactor some code in IPython which used multiple inheritance and metaclasses, -1 to this idea.<br><br></div><div class="gmail_extra">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).<br></div><div class="gmail_extra">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.<br><br></div><div class="gmail_extra">Thomas<br></div></div>