Created
May 21, 2014 14:58
-
-
Save calvingiles/4bbb37776b57b0e78d6c to your computer and use it in GitHub Desktop.
specialist function factory
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 specialist_function_factory(func, *s_args, **s_kwargs): | |
def specialist_func(*args, **kwargs): | |
all_args = s_args + args | |
all_kwargs = dict(list(s_kwargs.items()) + list(kwargs.items())) | |
return func(*all_args, **all_kwargs) | |
return specialist_func |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment