[Tutor] intefaces in python

Alan Gauld alan.gauld at btinternet.com
Mon Jun 29 11:19:41 CEST 2009


"Amit Sethi" <amit.pureenergy at gmail.com> wrote 

> class MyInterface(object):
>   doSomething(line):
>        raise NotImplementedError
>   doSomethingElse(line):
>       raise NotImplementedError
>
> I think that is exactly the kind of structure i was looking for ...

As a matter of interest, why? 
What do you anticipate using this for?
I have found a few cases where abstract interfaces are useful 
but they are very few and far between.

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



More information about the Tutor mailing list