[Zope] Problems with inheritance in python base products

Sascha Matzke Sascha Matzke <sascha@bespin.de>
Sun, 17 Oct 1999 12:22:19 +0200


Hello,

On Sun, Oct 17, 1999 at 06:44:10PM +1000, Robert Leftwich wrote:
> In order to access the base you need to use :
> 
> B.inheritedAttribute('__init__')(self,some, more)
> 
> Unfortunately, this only works in single inheritance hierarchies.

Ok, I tried this...

I have following __init__ in the superclass:

class A:
      def __init__(self, REQUEST):

If I use 

class B(ExtensionClass.Base, A):
      def __init__(self, some, other, REQUEST):
	  B.inheritedAttribute('__init__')(self, REQUEST)

I get following error..

Error Type: TypeError
Error Value: too many arguments; expected 1, got 2

Which - IMO - shouldn't happen.

Sascha
-- 
.-> Sascha Matzke - sascha@bespin.de - http://www.bespin.de -.
|   Macht kaputt was euch kaputt macht...                    |
|                                       Ton Steine Scherben  |
`-- On this earth for  24 years,    3 days  <----------------'