[Tutor] class question

Karim karim.liateni at free.fr
Wed Jan 26 12:19:43 CET 2011


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
that's all I remember from Java experience).
Indeed I was too direct everybody has the same style.

Regards
Karim

On 01/26/2011 12:08 PM, Alan Gauld wrote:
>
> "Karim" <karim.liateni at free.fr> wrote
>
>> Program towards interface that means you have to use inheritance.
>
> Just to be picky, you can program by interface without using 
> inheritance. Inheritance is only needed to implement interfaces in 
> languages like C++. In Python (and other dynamically bound OOP 
> languages) you can use polymorphism without inheritance.
>



More information about the Tutor mailing list