Skip to content

Instantly share code, notes, and snippets.

@Youw
Created November 17, 2016 09:48
Show Gist options
  • Save Youw/ce6e1ffb079949a4b140482347835e57 to your computer and use it in GitHub Desktop.
Save Youw/ce6e1ffb079949a4b140482347835e57 to your computer and use it in GitHub Desktop.
from wrapt import FunctionWrapper
def f1(a, b=2):
print(a, b)
def f2(*args, **kwargs):
f1(*args, **kwargs)
def f3(f, _, args, kwargs):
f(*args, **kwargs)
pass
f2 = FunctionWrapper(f1, f3)
f2(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment