title: What is the purpose of `__metaclass__ = type`?
body: <p>Python (2 only?) looks at the value of variable <code>__metaclass__</code> to determine how to create a <code>type</code> object from a class definition. <a href="https://stackoverflow.com/questions/7023932/python-metaclasses-at-module-level">It is possible to define <code>__metaclass__</code> at the module or package level</a>, in which case it applies to all subsequent class definitions in that module.</p>
  
  <p>However, I encountered the following in the <a href="http://pythonhosted.org/flufl.enum/" rel="nofollow noreferrer"><code>flufl.enum</code></a> package's <a href="http://bazaar.launchpad.net/~barry/flufl.enum/trunk/view/98/flufl/enum/__init__.py#L23" rel="nofollow noreferrer"><code>__init__.py</code></a>:</p>
  
  <pre><code>__metaclass__ = type
  </code></pre>
  
  <p>Since the default metaclass if <code>__metaclass__</code> is not defined is <code>type</code>, wouldn't this have no effect? (This assignment would revert to the default if <code>__metaclass__</code> were assigned to at a higher scope, but I see no such assignment.) What is its purpose?</p>