Skip to content

Instantly share code, notes, and snippets.

@j2labs
Created May 30, 2012 23:58
Show Gist options
  • Save j2labs/2839669 to your computer and use it in GitHub Desktop.
Save j2labs/2839669 to your computer and use it in GitHub Desktop.
simple partial demo
>>> import functools
>>> def foo(a,b,c):
... return a*b*c
...
>>> times_two = functools.partial(foo, 2)
>>> times_two(3,4)
24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment