Well I want to implement plug-in like mechanism for an application . I want to define some minimum functions that any body writing a plugin has to implement. For that i thought an interface would be best because in a scenario where the function is not implemented some kind of error would occur. I would love to hear if you think their is a better way to achieve this   <br>
<br><div class="gmail_quote">On Mon, Jun 29, 2009 at 2:49 PM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">&quot;Amit Sethi&quot; &lt;<a href="mailto:amit.pureenergy@gmail.com" target="_blank">amit.pureenergy@gmail.com</a>&gt; wrote <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
class MyInterface(object):<div class="im"><br>
  doSomething(line):<br>
       raise NotImplementedError<br>
  doSomethingElse(line):<br>
      raise NotImplementedError<br>
<br>
I think that is exactly the kind of structure i was looking for ...<br>
</div></blockquote>
<br>
As a matter of interest, why? What do you anticipate using this for?<br>
I have found a few cases where abstract interfaces are useful but they are very few and far between.<br><font color="#888888">
<br>
-- <br>
Alan Gauld<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a></font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>A-M-I-T S|S<br>