title: Abstract method inheritance in Python
body: <p>Let's assume that we have a Python class that makes use of the <a href="https://docs.python.org/2/library/abc.html" rel="nofollow" title="abc">abc</a> module to define an abstract attribute:</p>
  
  <pre><code>import abc
  
  class A(object):
      __metaclass__ = abc.ABCMeta
  
      @abc.abstractproperty
      def test_attribute(self):
          raise NotImplementedError
  </code></pre>
  
  <p>Let's now consider to define <code>B</code> that subclasses from <code>A</code> by adding a new method (<code>test_method()</code>), and <code>C</code> that subclasses from <code>B</code> implementing the abstract method originally declared in <code>A</code>:</p>
  
  <pre><code>class B(A):
  
      def test_method(self):
          pass
  
  class C(B):
  
      def test_attribute(self):
          # Implement abstract attribute
          pass
  </code></pre>
  
  <p>Assuming that I would like to keep <code>B</code> abstract (non-instantiable), shall I redefine the abstract property (<code>test_attribute</code>) and the metaclass assignment also in <code>B</code>? Or is it enough to inherit them from <code>A</code> (as in the above code)?</p>
  
  <p>I know that Python allows me to not redefine the abstract methods and thus inherit them from the parent class. Is this correct from a theoretical software engineering perspective?</p>
  
  <p>I'm asking so because if I'm not wrong other languages (such as Java) do not allow inheritance of abstract methods without reimplementing them as abstract...</p>