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 stdin, line 1, in module TypeError: Cannot create a consistent method resolution order (MRO) for

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 stdin, line 1, in module TypeError: Cannot create a consistent method