def __eq__(self, other):
if len(self) != len(other) or not isinstance(other, dict):<EOL><INDENT>return False<EOL><DEDENT>so = OrderedDict(zip(_lower(self.keys()), self.values()))<EOL>oo = other.__class__(zip(_lower(other.keys()), other.values()))<EOL>return so == oo<EOL>
assumes that classes that inherit dict have a constructor that is
        compatible with the dict class.