"Adam Bark" <adam.jt...@gmail.com> wrote

I can't figure out how super(C, self).__init__() is any better than
C.__init__(self), is there a preference? Does super do something special?

Whoops I should really think about these things for a minute first, you
don't have to know the superclass in advance is presumably the idea?

That's normally the idea behind super(eg in Smalltalk).
Unfortunately the Python version kind of negates that with the need
for the class in the super() call. I think Python v3 has improved this
but I admit is still use the parent.method(self...) style.
To me it is just more obvious and less error prone.

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to