This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stutzbach
Recipients LambertDW, georg.brandl, rhettinger, stutzbach
Date 2009-02-25.23:33:27
SpamBayes Score 0.00045520475
Marked as misclassified No
Message-id <1235604820.75.0.238760199722.issue5229@psf.upfronthosting.co.za>
In-reply-to
Content
Actually, it's essential to how super() works.  Here's an example using
single inheritance:

class A(object):
  def foo(self):
    print 'A'

class B(object):
  def foo(self):
    super(B, self).foo()
    print 'B'

class C(object):
  def foo(self):
    super(C, self).foo()
    print 'C'

x = C()
x.foo()

The "super" in x.foo() return a proxy for x that skips C.  
Next, we call foo() on that proxy, which calls B's foo().

In B's foo(), "self" is the proxy.  B's foo() passes the proxy to
super(), returning a new proxy for x that skips C and B.  Finally, we
call foo() on the new proxy, which calls A's foo().
History
Date User Action Args
2009-02-25 23:33:40stutzbachsetrecipients: + stutzbach, georg.brandl, rhettinger, LambertDW
2009-02-25 23:33:40stutzbachsetmessageid: <1235604820.75.0.238760199722.issue5229@psf.upfronthosting.co.za>
2009-02-25 23:33:27stutzbachlinkissue5229 messages
2009-02-25 23:33:27stutzbachcreate