Multiple inheritance : waht does this error mean ?

Ben Finney bignose+hates-spam at benfinney.id.au
Tue May 16 00:44:20 EDT 2006


jnair at ensim.com writes:

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

The class 'object' is already the base class of 'list', and of every
other basic type.

Python is saying that you need to decide what you want; inheritance
from 'object', or inheritance from something that already inherits
from 'object'.

-- 
 \       "People come up to me and say, 'Emo, do people really come up |
  `\                                         to you?'"  -- Emo Philips |
_o__)                                                                  |
Ben Finney




More information about the Python-list mailing list