summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-09-11 14:04:40 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-09-11 14:04:40 +0000
commit50497e3867564e68050d326b22dc41fe82d79dc0 (patch)
treea9697a6516d3ad9d9ebf3517818e409151772654 /django/utils
parentdb01d1d0a8b1d584b025164988de8003c2d29d1c (diff)
Refs #5138 -- Refactored implementation of __contains__ in HttpRequest introduced in [6097] after a suggestion from Malcolm. Applied a similar refactor for MergeDict and Context which had comparable behavior.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/datastructures.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index 4b60d1d194..d96e45b9c8 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -14,9 +14,6 @@ class MergeDict(object):
pass
raise KeyError
- def __contains__(self, key):
- return self.has_key(key)
-
def __copy__(self):
return self.__class__(*self.dicts)
@@ -45,6 +42,8 @@ class MergeDict(object):
if key in dict:
return True
return False
+
+ __contains__ = has_key
def copy(self):
""" returns a copy of this object"""