Skip to content

Instantly share code, notes, and snippets.

@durden
Created December 6, 2013 16:17
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 durden/7827474 to your computer and use it in GitHub Desktop.
Save durden/7827474 to your computer and use it in GitHub Desktop.
functools.partial returns a 'partial' object, not a function
>>> def func():
... print 'hello'
...
>>> from functools import partial
>>> def func(str_):
... print str_
...
>>> f = partial(func, 'world')
>>> f
<functools.partial object at 0x9fddf04>
>>> func
<function func at 0x9fe4a74>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment