title: Is it possible to generate a Python function with arguments in runtime?
body: <p>Say,</p>
  
  <p>I have a python function as following:</p>
  
  <pre><code>def ooxx(**kwargs):
      doSomething()
      for something in cool:
          yield something
  </code></pre>
  
  <p>I would like to provide another function with named arguments for hints as following:</p>
  
  <pre><code>def asdf(arg1, arg2, arg3=1):
      frame = inspect.currentframe()
      args, _, _, values = inspect.getargvalues(frame)
      kwargs = dict((key, values[key]) for key in args) # convert args list into dictionary form
      return list(ooxx(**kwargs))
  </code></pre>
  
  <p>Is it possible to have some sort of methods to generate automatically the function "asdf"? I have lots of dynamic generated ooxx functions and I would like to have corresponding asdf functions with customized named arguments. Not sure if this is the correct requirement or right way to coding :p</p>