On 22 Apr 2001, Bernhard Herzog wrote:

> Well, the ExtensionClass docs contain the following example, which is
> actually a bit different (i.e. I did not remember correctly) from the
> situation above (taken from the ExtensionClass.stx that comes with Zope
> 2.3.0:
>
>       from ExtensionClass import Base
>
>       class Spam:
>
>         def __init__(self, name):
>         self.name=name
>
>       class ECSpam(Base, Spam):
>
>         def __init__(self, name, favorite_color):
>         Spam.__init__(self,name)
>         self.favorite_color=favorite_color
>
> and the docs go on to say:
>
>     This implementation will fail when an 'ECSpam' object is
>     instantiated.  The problem is that 'ECSpam.__init__' calls
>     'Spam.__init__', and 'Spam.__init__' can only be called with a
>     Python instance (an object of type '"instance"') as the first
>     argument.  The first argument passed to 'Spam.__init__' will be an
>     'ECSpam' instance (an object of type 'ECSPam').
>
> So at least mixin classes are a bit of a problem with ExtensionClasses
> (there's a solution to the problem given in the docs, however). It may
> well be that with Python 2.0 this is not an issue anymore.

This won't affect pygtk.  GtkWidgets won't work if you don't chain to
their constructor anyway, so I don't think this will be a problem.  This
hasn't been an issue with any of the examples I have tested.

James.

-- 
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to