Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored September 23, 2006

Showing 1 changed file with 3 additions and 0 deletions. Show diff stats Hide diff stats

  1. 3  django/utils/datastructures.py
3  django/utils/datastructures.py
@@ -14,6 +14,9 @@ def __getitem__(self, key):
14 14
                 pass
15 15
         raise KeyError
16 16
 
  17
+    def __contains__(self, key):
  18
+        return self.has_key(key)
  19
+
17 20
     def get(self, key, default):
18 21
         try:
19 22
             return self[key]

0 notes on commit 35a13d4

Please sign in to comment.
Something went wrong with that request. Please try again.