def __eq__(self, other):
    if isinstance(other, collections.Mapping):
        other = CaseInsensitiveDict(other)
    else:
        return NotImplemented
    return (dict(self.lower_items()) == dict(other.lower_items()))
def __eq__(self, other):
    if isinstance(other, collections.Mapping):
        other = CaseInsensitiveDict(other)
    else:
        return NotImplemented
    return (dict(self.lower_items()) == dict(other.lower_items()))