Created
November 17, 2016 09:48
-
-
Save Youw/ce6e1ffb079949a4b140482347835e57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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