[Tutor] error message with multiple inheritance

Christopher Spears cspears2002 at yahoo.com
Wed Jun 11 07:12:17 CEST 2008


I've been working out of Core Python Programming (2nd Edition).  Here is an example demonstrating multiple inheritance.

>>> class A(object):
...     pass
...
>>> class B(A):
...     pass
...
>>> class C(B):
...     pass
...
>>> class D(A, B):
...     pass
...
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: Error when calling the metaclass bases
    Cannot create a consistent method resolution
order (MRO) for bases B, A

What does this error message mean?  The example worked in the book.  I checked in the docs and could not find anything.

Thanks!


      


More information about the Tutor mailing list