title: Class __repr__ of a metaclass, not a class
body: <p>I am aware of the ability to define a <code>'class repr'</code> by using a metaclass. However, I need the functionality of returning the metaclass with its own <code>__repr__</code> as such:</p>
  
  <pre><code>class Meta(type):
      def __repr__(cls):
          return 'Person class: {}'.format(cls.__name__)
  
  
  class Person(metaclass=Meta):
      def __init__(self, name, age, job):
          self.name = name
          self.job = job
          self.age = age
  
      def __str__(self):
          return 'Person: {}, {}, {}'.format(self.name,
                                             self.age,
                                             self.job)
  
  
  class Employee(Person):
      def __init__(self, name, age):
          super(Employee, self).__init__(name, age, 'employee')
  
  
  class Manager(Person):
      def __init__(self, name, age):
          super(Manager, self).__init__(name, age, 'manager')
  
  m = Manager('bob', 79)
  e = Employee('stephen', 25)
  </code></pre>
  
  <p>As expected, <code>type(e)</code> and <code>type(m)</code> return their respective <code>'Person class: ...'</code>, however, if I do <code>type(Employee)</code>, I get <code>&lt;class '__main__.Meta'&gt;</code>. I need this class to have its own <code>__repr__</code> as the actual implementation I am using consists of a base <code>Type</code> class with subclasses of <code>String</code>, <code>Number</code>, etc. Calling type on the instances works just fine, but since type may be also called on the class, I need a more 'user-friendly' return string. </p>