Skip to content

Instantly share code, notes, and snippets.

@bobpoekert
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobpoekert/57e8500a681c6d8f0c82 to your computer and use it in GitHub Desktop.
Save bobpoekert/57e8500a681c6d8f0c82 to your computer and use it in GitHub Desktop.
class partial(object):
def __init__(self, fn, *args):
self.fn = fn
self.args = args
def __call__(self, *extra_args):
return self.fn(*(self.args + extra_args))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment