Created
May 30, 2012 23:58
-
-
Save j2labs/2839669 to your computer and use it in GitHub Desktop.
simple partial demo
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
>>> 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