              if key in d:
                  return True
          return False
  
      def __contains__(self, key):
          return self.has_key(key)
  
      def get(self, key, otherwise=None):
          for d in self.dicts:
              if key in d:
                  return d[key]
 
</s> remove     def __contains__(self, key):
 </s> add     def has_key(self, key): </s> remove     def __contains__(self, key):
        return self.has_key(key)

 </s> add  </s> remove     def has_key(self, key):
        return key in self
 </s> add     __contains__ = has_key
    __contains__ = has_key
              if key in d:
                  return True
          return False
  
    __contains__ = has_key
    __contains__ = has_key
  
      def get(self, key, otherwise=None):
          for d in self.dicts:
              if key in d:
                  return d[key]
keep keep keep keep replace replace keep keep keep keep keep
 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 
django/template/context.py