1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

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
This commit is contained in:
Russell Keith-Magee
2007-09-11 14:04:40 +00:00
parent db01d1d0a8
commit 50497e3867
3 changed files with 5 additions and 8 deletions

View File

@@ -49,8 +49,7 @@ class Context(object):
return True
return False
def __contains__(self, key):
return self.has_key(key)
__contains__ = has_key
def get(self, key, otherwise=None):
for d in self.dicts: