title: python decorate function call
body: <p>I recently learned about decorators and wondered if it's possible to use them not in a function definition but in a function call, as some kind of general wrapper.</p>
  
  <p>The reason for that is, that I want to call functions from a module through a user-defined interface that does repeatable things to a function and I don't want to implement a wrapper for every single function.</p>
  
  <p>In principle I would like to have something like</p>
  
  <pre><code>def a(num):
      return num
  
  @double
  a(2)
  </code></pre>
  
  <p>returning 4 without the need of having access to the implementation of <code>a</code>. 
  Or would in this case a global wrapper like</p>
  
  <pre><code>def mutiply(factor,function,*args,**kwargs):
      return factor*function(*args,*kwargs)
  </code></pre>
  
  <p>be the better choice?</p>