[Tutor] Inheritance, superclass, ‘super’

Ben Finney ben+python at benfinney.id.au
Fri Jul 3 01:29:33 CEST 2015


Steven D'Aprano <steve at pearwood.info> writes:

> I mostly agree with what Ben says, comments below.
>
> On Wed, Jul 01, 2015 at 12:48:47PM +1000, Ben Finney wrote:
> >     So please use `super`, even in single inheritance. Otherwise you are
> >     restricting the usefulness of your class: it can never be used with
> >     multiple inheritance.
>
> I cannot disagree with Ben here. Even if you only intend to use single
> inheritance, don't unnecessarily rule out the alternatives. Using
> super is still usually the right thing to do.

I'm glad you agree with the above, since I was quoting your words from
2011 :-)

-- 
 \        “… no testimony can be admitted which is contrary to reason; |
  `\   reason is founded on the evidence of our senses.” —Percy Bysshe |
_o__)                        Shelley, _The Necessity of Atheism_, 1811 |
Ben Finney



More information about the Tutor mailing list