title: Determine if a Python class is an Abstract Base Class or Concrete
body: <p>My Python application contains many abstract classes and implementations. For example:</p>
  
  <pre class="lang-python prettyprint-override"><code>import abc
  import datetime
  
  class MessageDisplay(object):
      __metaclass__ = abc.ABCMeta
  
      @abc.abstractproperty
      def display(self, message):
          pass
  
  class FriendlyMessageDisplay(MessageDisplay):
      def greet(self):
          hour = datetime.datetime.now().timetuple().tm_hour
  
          if hour &lt; 7:
              raise Exception("Cannot greet while asleep.")
          elif hour &lt; 12:
              self.display("Good morning!")
          elif hour &lt; 18:
              self.display("Good afternoon!")
          elif hour &lt; 20:
              self.display("Good evening!")
          else:
              self.display("Good night.")
  
  class FriendlyMessagePrinter(FriendlyMessageDisplay):
      def display(self, message):
          print(message)
  </code></pre>
  
  <p><code>FriendlyMessagePrinter</code> is a concrete class that we can use...</p>
  
  <pre class="lang-python prettyprint-override"><code>FriendlyMessagePrinter().greet()
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>Good night.
  </code></pre>
  
  <p>...but <code>MessageDisplay</code> and <code>FriendlyMessageDisplay</code> are abstract classes and attempting to instantiate one would result in an error:</p>
  
  <pre class="lang-none prettyprint-override"><code>TypeError: Can't instantiate abstract class MessageDisplay with abstract methods say
  </code></pre>
  
  <p>How can I check if a given class object is an (uninstantiatable) abstract class?</p>