title: How to reproduce a Java interface behaviour in a pythonic way
body: <p>Let us define a class called <code>Filter</code>. I want this class to be extended by subclasses and I want all these subclasses to override a method : <code>job</code>.</p>
  
  <p>More specifically</p>
  
  <pre><code>class Filter(object):
      def __init__(self, csvin=None):
          self._input = csvin
  
      # I want this to be abstract. All the classes that inherit from Filter should
      # implement their own version of job.
      def job(self):
          pass
  </code></pre>
  
  <p>Said differently, I want to make sure that any subclass of <code>Filter</code> has a method called <code>job</code>.</p>
  
  <p>I heard about the module <code>abc</code>, but I also read about these concepts called duck-typing and EAFP. My understanding is that, if I am a duck, I will just try to run</p>
  
  <pre><code>f = SomeFilter()
  f.job()
  </code></pre>
  
  <p>and see if it works. This is my problem if it raises any exception, I should have been more careful when I wrote the class <code>SomeFilter</code>.</p>
  
  <p>I am pretty sure I do not fully understand the meaning of duck-typing and EAFP, but if it means that I have to postpone debugging as late as possible (that is, at invokation time), then I disagree with this way of thinking. I do not understand why so many people seem to appreciate this EAFP philosophy, but I wish to be part of them.</p>
  
  <p>Can someone convert me and explain how to achieve this in a <strong>safe</strong> and <strong>predictive</strong> manner, that is by preventing the programmer from making a mistake when extending <code>Filter</code>, <strong>in a pythonic way</strong>.</p>