summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/utils/functional.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 72a66917fc..f4580e7bd5 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -1,5 +1,3 @@
-import copy
-
def curry(_curried_func, *args, **kwargs):
def _curried(*moreargs, **morekwargs):
return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
@@ -104,9 +102,11 @@ def lazy(func, *resultclasses):
raise AssertionError('__mod__ not supported for non-string types')
def __deepcopy__(self, memo):
- result = copy.copy(self)
- memo[id(self)] = result
- return result
+ # Instances of this class are effectively immutable. It's just a
+ # collection of functions. So we don't need to do anything
+ # complicated for copying.
+ memo[id(self)] = self
+ return self
def __wrapper__(*args, **kw):
# Creates the proxy object, instead of the actual value.