Skip to content

Instantly share code, notes, and snippets.

@jfialkoff
Created August 26, 2013 21:41
Show Gist options
  • Save jfialkoff/6347006 to your computer and use it in GitHub Desktop.
Save jfialkoff/6347006 to your computer and use it in GitHub Desktop.
A collection of functional tools.
from django.utils.functional import curry
def spicy_curry(kallable, *args, **kwargs):
class CurryMixin(object):
def __init__(self, *moreargs, **morekwargs):
return super(CurryMixin, self).__init__(
*(args+moreargs), **dict(kwargs, **morekwargs))
res = type(kallable.__name__, (CurryMixin, kallable), {})
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment