title: Why an object in python is of type 'instance'?
body: <p>I have the following code:</p>
  
  <pre><code>&gt;&gt;&gt; class MyClass:
      pass
  
  &gt;&gt;&gt; myObj=MyClass()
  
  &gt;&gt;&gt; type(myObj)
  &lt;type 'instance'&gt;     &lt;==== Why it is not type MyClass ?
  
  &gt;&gt;&gt; type(MyClass)
  &lt;type 'classobj'&gt;  &lt;=== Why it is not just 'MyClass'?
  
  &gt;&gt;&gt; isinstance(myObj, instance)  &lt;==== Why the 'instance' is not defined?
  
  Traceback (most recent call last):
    File "&lt;pyshell#91&gt;", line 1, in &lt;module&gt;
      isinstance(myObj, instance)
  NameError: name 'instance' is not defined
  
  &gt;&gt;&gt; isinstance(myObj, MyClass)
  True
  
  &gt;&gt;&gt; myObj.__class__
  &lt;class __main__.MyClass at 0x0000000002A44D68&gt; &lt;=== Why different from type(myObj) ?
  </code></pre>
  
  <p>It seems Python has <strong>some extra indirection</strong> between a class and its instance type.</p>
  
  <p>I am used to C#. In C#, <code>typeof(MyClass)</code> will just return the <code>MyClass</code>.</p>
  
  <h2>Add 1</h2>
  
  <p>Below is some comparison between 2.7.6 and 3.4.1.</p>
  
  <p><strong>I am wondering how the <code>==</code> operator is implemented in Python.</strong></p>
  
  <p><img src="https://i.stack.imgur.com/5hj0C.jpg" alt="enter image description here"></p>