Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2791 -- Added __contains__ method (for "a in dict" checks) to …

…MergeDict.

Thanks, Ned Batchelder.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 35a13d4b6b001b476a36f49808631ac6f8762742 1 parent 28fad23
@malcolmt malcolmt authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/utils/datastructures.py
View
3  django/utils/datastructures.py
@@ -14,6 +14,9 @@ def __getitem__(self, key):
pass
raise KeyError
+ def __contains__(self, key):
+ return self.has_key(key)
+
def get(self, key, default):
try:
return self[key]
Please sign in to comment.
Something went wrong with that request. Please try again.