ddtl a écrit :
> On 7 Sep 2006 10:42:54 -0700, in comp.lang.python you wrote:
>
>
>>Let's examine what the mro order is for class D:
>>
>D.mro()
>>
>>[, , ,
>>>n__.A'>, ]
>>
>>When you call d.met(), the call dispatches to the D.met() method.
>>After printing out 'D.met', you use super() to ge
ddtl wrote:
> On 7 Sep 2006 10:42:54 -0700, in comp.lang.python you wrote:
>
>
>>Let's examine what the mro order is for class D:
>>
>D.mro()
>>
>>[, , ,
>>>n__.A'>, ]
>>
>>When you call d.met(), the call dispatches to the D.met() method.
>>After printing out 'D.met', you use super() to get t
On 7 Sep 2006 10:42:54 -0700, in comp.lang.python you wrote:
>Let's examine what the mro order is for class D:
D.mro()
>[, , ,
>n__.A'>, ]
>
>When you call d.met(), the call dispatches to the D.met() method.
>After printing out 'D.met', you use super() to get the next class in
>the mro order,
ddtl wrote:
> Hello everybody.
>
> Consider the following code:
>
>
> class A(object):
> def met(self):
> print 'A.met'
> class B(A):
> def met(self):
> print 'B.met'
> super(B,self).met()
> class C(A):
> def met(self):
> print 'C.met'
> super(C,
Hello everybody.
Consider the following code:
class A(object):
def met(self):
print 'A.met'
class B(A):
def met(self):
print 'B.met'
super(B,self).met()
class C(A):
def met(self):
print 'C.met'
super(C,self).met()
class D(B,C):
def met(self