[Tutor] Multiple inheritance - Need clarity

Manprit Singh manpritsinghece at gmail.com
Sat Nov 27 10:36:14 EST 2021


Once again many many thanks  to Dennis and Alan sir for this mail .
Actually I do work with Scientific computing  (Numpy and pandas &
matplotlib and Scikit-learn the most ), my work is rarely related to OOPS
(Just making some simple classes for transformations etc.) . Just trying to
learn....

Regards
Manprit Singh


On Sat, Nov 27, 2021 at 4:40 PM Alan Gauld via Tutor <tutor at python.org>
wrote:

> On 27/11/2021 03:14, Dennis Lee Bieber wrote:
>
> >       But with your multiple inheritance, you would have to explicitly
> call
> >
> >       top_bottom_area = 2 * Circle.area()
> >       column_area = Rectangle.area()
> >
> > as using super... will only call the first item in the MRO.
>
> Ah, good point. My recommendation to use super() here was
> misplaced. You need to call both.
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list