title: Why does __self__ of built-in functions return the builtin module it belongs to?
body: <p>Methods have an attribute, <code>__self__</code>, that holds the instance to be passed when the underlying function gets invoked. Apparently, so do built-in functions.</p>
  
  <p>In Python 3, they hold the module object:</p>
  
  <pre><code>&gt;&gt;&gt; len.__self__
  &lt;module 'builtins' (built-in)&gt;
  &gt;&gt;&gt; sys.getrefcount.__self__  # also for other builtin modules
  &lt;module 'sys' (built-in)&gt;
  </code></pre>
  
  <p>In Python 2, on the other hand, they hold <code>None</code>:</p>
  
  <pre><code>&gt;&gt;&gt; type(len.__self__)
  &lt;type 'NoneType'&gt;
  &gt;&gt;&gt; sys.getrefcount.__self__
  &lt;type 'NoneType'&gt;
  </code></pre>
  
  <p>Does anyone know why there's a discrepancy here? In addition to that, why do these even have a <code>__self__</code> and aren't like Python level module functions that lack a <code>__self__</code> attribute:</p>
  
  <pre><code>&gt;&gt;&gt; from pprint import pprint
  &gt;&gt;&gt; pprint.__self__
  AttributeError: 'function' object has no attribute '__self__'
  </code></pre>