title: Python: "name ascii() is not defined"
body: <p>I've executed this from the Python REPL:</p>
  
  <pre><code>&gt;&gt;&gt; ascii('Łukasz')
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'ascii' is not defined
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Why isn't a built-in function recognized?</p>
  
  <p>The same thing happen when I executed this script with Python interpreter:</p>
  
  <pre><code>#!/user/bin/python
  # -*- coding: UTF-8 -*-
  
  def escape_unicode(f):
      def wrap(*args, **kwargs):
          x = f(*args, **kwargs)
          return ascii(x)
  
      return wrap     
  
  @escape_unicode
  def my_name():
      return 'Łukasz'
  
  my_name()
  </code></pre>
  
  <blockquote>
    <p>NameError: global name 'ascii' is not defined</p>
  </blockquote>