1

I am doing a GSoC project that involves inheriting from two classes and I am running into the following error on account of both of the classes I am inheriting from having __slots__ defined.

TypeError: Error when calling the metaclass bases
    multiple bases have instance lay-out conflict

The easiest way I have found to solve this issue is to remove the __slots__ declaration from either of the parent classes and move it into the child class. Unfortunately that means that my package would require including a modification of one parent classes in its distribution, which I would like to avoid. All of the solutions to this problem that I have found so far (on here and through googling) involve modifying a parent class. Is there a general solution to this that I have missed that can be done entirely with changes to the child class?

mpcervin
  • 11
  • 2
  • 4
    Do you really need to inherit from the problem classes? Usually, you can just screw inheritance and wrap them. – user2357112 Jul 30 '14 at 00:52

0 Answers0