title: Python UnboundLocalError Embedded def
body: <p>This usually works; however, it's not this time:</p>
  
  <pre><code>def fn(text):
      def fn2():
          print text
  
      fn2()
  </code></pre>
  
  <p>How can I fix this?</p>
  
  <p>Thanks.</p>
  
  <p>Edit: I don't want to pass in text.</p>