Skip to content

Instantly share code, notes, and snippets.

@PiDelport
Last active October 10, 2015 21:48
Show Gist options
  • Select an option

  • Save PiDelport/3756230 to your computer and use it in GitHub Desktop.

Select an option

Save PiDelport/3756230 to your computer and use it in GitHub Desktop.

Revisions

  1. PiDelport renamed this gist Aug 13, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. PiDelport created this gist Sep 20, 2012.
    7 changes: 7 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    import inspect

    def format_call(func, *positional, **named):
    _locals = inspect.getcallargs(func, *positional, **named)
    spec = inspect.getargspec(func)
    argvalues = inspect.formatargvalues(spec.args, spec.varargs, spec.keywords, _locals)
    return '{}{}'.format(func.__name__, argvalues)