Last active
December 16, 2015 19:19
-
-
Save adamkal/5484752 to your computer and use it in GitHub Desktop.
context issue.
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
def forced_params(*params): | |
def outer(fn): | |
params = [fn.__name__] + params | |
def inner(*args): | |
args = params + args | |
return fn(*args) | |
return inner | |
return outer | |
@forced_params('lemon') | |
def some_func(*args): | |
print args | |
some_func('eggs', 'ham') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment