Skip to content

Instantly share code, notes, and snippets.

@calvingiles
Created May 21, 2014 14:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calvingiles/4bbb37776b57b0e78d6c to your computer and use it in GitHub Desktop.
Save calvingiles/4bbb37776b57b0e78d6c to your computer and use it in GitHub Desktop.
specialist function factory
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