Skip to content

Instantly share code, notes, and snippets.

@Ouwen
Created September 3, 2019 20:01
Show Gist options
  • Save Ouwen/cea27e20300cbc9534001220fa0038a1 to your computer and use it in GitHub Desktop.
Save Ouwen/cea27e20300cbc9534001220fa0038a1 to your computer and use it in GitHub Desktop.
from functools import partial
# Try to code partial from scratch! (hint, use *args and **kwargs as parameter catch alls)
def function_with_several_params(a='None', b='None'):
print(a, b)
tmp = partial(function_with_several_params, a='hello')
tmp(b='goodbye')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment