code: def filter(self, **kwargs):
          '''Assumes all the dict's items are hashable.
          '''
          # So we don't return anything more than once.
          yielded = set()
  
          dunder = '__'
          filter_items = set()
          for k, v in kwargs.items():
              if dunder in k:
                  k, op = k.split(dunder)
                  try:
                      handler = getattr(self, 'handle__%s' % op)
                  except AttributeError:
                      msg = '%s has no %r method to handle operator %r.'
                      raise NonExistentHandler(msg % (self, handler, op))
                  for dicty in self:
                      if handler(k, v, dicty):
                          dicty_id = id(dicty)
                          if dicty_id not in yielded:
                              yield dicty
                              yielded.add(dicty_id)
              else:
                  filter_items.add((k, v))
  
          for dicty in self:
              dicty_items = set(dicty.items())
              if filter_items.issubset(dicty_items):
                  yield dictf filter(self, **kwargs):
          '''Assumes all the dict's items are hashable.
          '''
          # So we don't return anything more than once.
          yielded = set()
  
          dunder = '__'
          filter_items = set()
          for k, v in kwargs.items():
              if dunder in k:
                  k, op = k.split(dunder)
                  try:
                      handler = getattr(self, 'handle__%s' % op)
                  except AttributeError:
                      msg = '%s has no %r method to handle operator %r.'
                      raise NonExistentHandler(msg % (self, handler, op))
                  for dicty in self:
                      if handler(k, v, dicty):
                          dicty_id = id(dicty)
                          if dicty_id not in yielded:
                              yield dicty
                              yielded.add(dicty_id)
              else:
                  filter_items.add((k, v))
  
          for dicty in self:
              dicty_items = set(dicty.items())
              if filter_items.issubset(dicty_items):
                  yield dicty
docs: Assumes all the dict's items are hashable.