title: Using abstract base class VS plain inheritance
body: <p>I'm trying to understand the benefits of using <a href="http://docs.python.org/2/library/abc.html" rel="noreferrer">abstract base classes</a>.  Consider these two pieces of code:</p>
  
  <p>Abstract base class:</p>
  
  <pre><code>from abc import ABCMeta, abstractmethod, abstractproperty
  
  class CanFly:
      __metaclass__ = ABCMeta
  
      @abstractmethod
      def fly(self):
          pass
  
      @abstractproperty
      def speed(self):
          pass
  
  
  class Bird(CanFly):
  
      def __init__(self):
          self.name = 'flappy'
  
      @property
      def speed(self):
          return 1
  
      def fly(self):
          print('fly')
  
  
  b = Bird()
  
  print(isinstance(b, CanFly))  # True
  print(issubclass(Bird, CanFly))  #  True
  </code></pre>
  
  <p>Plain inheritance:</p>
  
  <pre><code>class CanFly(object):
  
      def fly(self):
          raise NotImplementedError
  
      @property
      def speed(self):
          raise NotImplementedError()
  
  
  class Bird(CanFly):
  
      @property
      def speed(self):
          return 1
  
      def fly(self):
          print('fly')
  
  
  b = Bird()
  
  print(isinstance(b, CanFly))  # True
  print(issubclass(Bird, CanFly))  # True
  </code></pre>
  
  <p>As you see, both methods support inflection using <code>isinstance</code> and <code>issubclass</code>.</p>
  
  <p>Now, one difference I know is that, if you try to instantiate a subclass of an abstract base class without overriding all abstract methods/properties, your program will fail loudly.  However, if you use plain inheritance with <code>NotImplementedError</code>, your code won't fail until you actually invoke the method/property in question.</p>
  
  <p>Other than that, what makes using abstract base class different?</p>