[Tutor] class question

Alan Gauld alan.gauld at btinternet.com
Wed Jan 26 18:44:36 CET 2011


"Karim" <karim.liateni at free.fr> wrote

> Sure, but I come from java world and 1 inheritance is allowed but we 
> can implement multiple interfaces.
> I like to use Abstract classes in Python then inherit and implement 
> abstract method like in java (at least

Sure and that is the normal way of doing it. Not least because you
can inherit non abstract methods too! But there is a danger of 
forgetting
that inheritance is not the *only* way.

Thats all I was pointing out, inheritance is the norm but not 
essential.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list