title: Access builtin functions by __builtins__
body: <p>I have the following script:</p>
  
  <p><em>a.py</em></p>
  
  <pre><code>print(__builtins__.max)
  import b
  </code></pre>
  
  <p>and the following module:</p>
  
  <p><em>b.py</em></p>
  
  <pre><code>print(__builtins__.max)
  </code></pre>
  
  <p>Launching them with <code>python3 a.py</code> I get:</p>
  
  <pre><code>&lt;built-in function max&gt;
  Traceback (most recent call last):
    File "a.py", line 2, in &lt;module&gt;
      import b
    File "/home/antonio/Scrivania/b.py", line 1, in &lt;module&gt;
      print(__builtins__.max)
  AttributeError: 'dict' object has no attribute 'max'
  </code></pre>
  
  <p>so I don't understand. Why in the script <code>__builtins__</code> is assigned to the builtins module instead in the module <code>__builtins__</code> is assigned to a dict?</p>