On Jan 4, 2008 3:03 PM, Ming <[EMAIL PROTECTED]> wrote: > I'm working through Wesley Chun's CPP2e and got this error on 13.11.1, > pp 548 where his interpreter snippet shows no problems: > > ActivePython 2.5.1.1 (ActiveState Software Inc.) b > Python 2.5.1 (r251:54863, May 1 2007, 17:47:05) [ > win32 > Type "help", "copyright", "credits" or "license" f > >>> 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 <module> > TypeError: Error when calling the metaclass bases > Cannot create a consistent method resolution > order (MRO) for bases A, B
The mro of new-style classes changed between Python 2.2 and 2.3. Perhaps Mr. Chun's code was written for 2.2. See http://www.python.org/download/releases/2.3/mro/ -- Neil Cerutti
-- http://mail.python.org/mailman/listinfo/python-list