Pretty sure you can do this:

class A(object):
        def m(self):
class B(A):
        def m(self):
class C(A):
        def m(self):
class D(B,C):
        def m(self):
                A.m(self)
 
I don't think you want to try to use super() in this case.

-jdc 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martin
Manns
Sent: Thursday, April 05, 2007 4:20 PM
To: python-list@python.org
Subject: grandparent method with super

Hi,

I have a class structure as follows and I would like to invoke the method
A.m() from D.m

class A(object):
        def m(self):
class B(A):
        def m(self):
class C(A):
        def m(self):
class D(B,C):
        def m(self):
                # Call A.m with super?

I have read http://www.python.org/download/releases/2.2/descrintro/ but I am
still stuck.

Thanks in advance

Martin
--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to