Re: mixins and new style classes

2010-02-17 Thread Bruno Desthuilliers
mk a écrit : class Person(object): > ... pass > ... class Friendly(object): > ... def hello(self): > ... print 'hello' > ... Person.__bases__ += (Friendly,) > Traceback (most recent call last): > File "", line 1, in > TypeError: Cannot create a consistent

mixins and new style classes

2010-02-17 Thread mk
>>> class Person(object): ... pass ... >>> class Friendly(object): ... def hello(self): ... print 'hello' ... >>> >>> Person.__bases__ += (Friendly,) Traceback (most recent call last): File "", line 1, in TypeError: Cannot create a consistent method resolution order (MRO) fo