Created
August 20, 2019 20:48
-
-
Save waynew/addc38f6dc821e57be3666d2d0d5b96b to your computer and use it in GitHub Desktop.
Revisions
-
waynew created this gist
Aug 20, 2019 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ import functools def bloop(arg): def wrapper(func): @functools.wraps(func) def f(*args, **kwargs): print('le func name:', func.__name__, 'le func:', func) return func(*args, **kwargs) return f return wrapper def squizzy(arg): def wrapper(func): @functools.wraps(func) def f(*args, **kwargs): return func(*args, **kwargs) return f return wrapper @squizzy('thing') @bloop('hello') def bar(): print('Hi mom') print('ok') bar()