Browse files

Optimized django.utils.functional.curry. Thanks for the patch, Martin…

… Glueck

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3733 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 6152b32 commit 29ba3e337bd9c95d059eeae55a3743b675c21150 @adrianholovaty adrianholovaty committed Sep 7, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/utils/functional.py
View
4 django/utils/functional.py
@@ -1,6 +1,6 @@
-def curry(*args, **kwargs):
+def curry(func, *args, **kwargs):
def _curried(*moreargs, **morekwargs):
- return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items()))
+ return func(*(args+moreargs), **dict(kwargs, **morekwargs))
return _curried
class Promise:

0 comments on commit 29ba3e3

Please sign in to comment.