Is it possible to use mixin classes with extension classes? I am playing around with adding an additional base class to Folder, but the usual way of mixing in classes doesn't seem to work (i.e. Folder.__bases__ = (MyClass,)+Folder.__bases__). Is there another way to do this? Kevin Smith Kevin.Smith@theMorgue.org
Kevin Smith writes:
Is it possible to use mixin classes with extension classes? It is. It is done in hundreds of places inside the Zope code.
I am playing around with adding an additional base class to Folder, but the usual way of mixing in classes doesn't seem to work (i.e. I would not call this the "usual" way to use mixin classes... Folder.__bases__ = (MyClass,)+Folder.__bases__). Is there another way to do this? As I read (and you already found out), it does not work...
The usual way is: class Folder(...): ... class Folder(MyClass,Folder): pass Dieter
participants (2)
-
Dieter Maurer -
Kevin Smith