title: Execute a function from a function object
body: <p><em>In all of the examples, <code>a</code> is :</em></p>
  
  <pre><code>&gt;&gt;&gt; def a():
  ...     print "aaaaaaa"
  </code></pre>
  
  <p>I have been passed a function object from another piece of code, and I need to execute that function.</p>
  
  <p>When I say "function object", I mean an object like this:</p>
  
  <pre><code>&gt;&gt;&gt; type(a)
  &lt;type 'function'&gt;
  </code></pre>
  
  <p>Have a look at this:</p>
  
  <pre><code>&gt;&gt;&gt; def function(f):
  ...     print "start"
  ...     f
  ...     print "end"
  
  &gt;&gt;&gt; function(a)
  start
  end
  </code></pre>
  
  <p>If <code>function()</code> was executing the function it was passed, the output would have an <code>aaaaaaa</code> in the middle of it (returned from <code>a()</code>, which was the function passed to it)</p>
  
  <p>So how can I execute a function when passed the function object?</p>
  
  <p><em>(Sorry if this isn't very clear, I'm confusing myself as well...)</em></p>