title: python function wrapping not working
body: <p>I got example on <a href="https://www.youtube.com" rel="nofollow">https://www.youtube.com</a> for function wrapping ,but it throw exception.</p>
  
  <pre><code>def addOne(myfunc):
  
      def addOneInside(myfunc):       
          return myfunc()+1
  
      return addOneInside
  
  def oldFunc():
  
      return 3
  
  oldFunc=addOne(oldFunc)
  
  print oldFunc()
  </code></pre>
  
  <p>error is :</p>
  
  <blockquote>
    <p>TypeError: addOneInside() takes exactly 1 argument (0 given)</p>
  </blockquote>
  
  <p>can any body explain what is the problem.</p>