On Monday 31 December 2001 01:19 pm, Geoffrey Talvola wrote: > At 01:50 PM 12/31/01 -0800, Tavis Rudd wrote: > >and one more thing ... the __bases__ attribute in new-style classes > >is read-only. This would prevent Chuck's Mixin.py from working and > >might cause problems with WebKit's plugin architecture. > > Chuck's Mixin code only assigns to __bases__ if makeAncestor=1 is > passed in as an argument, and the docstring says: > > "If makeAncestor is 1, then a different technique is employed: the > mixInClass is made the first base class of the pyClass. You probably > don't need to use this and if you do, be aware that your mix-in can > no longer override attributes/methods in pyClass." > > So not being able to assign to __bases__ shouldn't hurt us, as it > only affects an option we're not supposed to use :-) > > Maybe Chuck could explain the purpose of the makeAncestor option -- > I'm not sure why it's there at all.
It is there purely for legacy reasons. Assigning to __bases__ was the first approach of MixIn and is described in the associated article (I believe). In practice, I have never needed that option and we can easily drop it unless someone has a particular objection. -Chuck _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
