super with only one argument

Michele Simionato michele.simionato at
Tue Mar 15 04:37:59 CET 2005

No, you should use the version with two arguments for that.
The second argument would be a class however, not an instance.

class C(object):
    def f():
        print "C.f"

class D(C):
    def f():
        print "D.f"
        super(D, D).f()


Just using super(D).f() would not work. ``super`` with only one
argument is
a recipe for headaches.

              Michele Simionato

More information about the Python-list mailing list