Message21203
Logged In: YES
user_id=764593
Would an expanded example also help?
I'm not sure I like my own wording yet, but ... I propose it as a
straw man.
"""super returns the next parent class[1]
class A(object): pass
class B(A):
def meth(self, arg):
super(B, self).meth(arg)
class C(A): pass
class D(B, C): pass
d=D()
d.meth()
In this case, the super(B, self) call will actually return a
reference to class C. Class C is not a parent of class B, but it
is the next parent for this particular instance d of class B.
[1] Actually, a super class mimicing the parent class.
""" |
|
Date |
User |
Action |
Args |
2007-08-23 14:22:39 | admin | link | issue973579 messages |
2007-08-23 14:22:39 | admin | create | |
|