title: How do I get the return value when using Python exec on the code object of a function?
body: <p>For testing purposes I want to directly execute a function defined inside of another function.</p>
  
  <p>I can get to the code object of the child function, through the code (func_code) of the parent function, but when I exec it, i get no return value.</p>
  
  <p>Is there a way to get the return value from the exec'ed code?</p>