7 raise AttributeError(
"A frozendict cannot be modified.")
8 _blocked_attribute = property(_blocked_attribute)
10 __delitem__ = __setitem__ = clear = _blocked_attribute
11 pop = popitem = setdefault = update = _blocked_attribute
14 new = dict.__new__(cls)
18 if isinstance(arg, dict):
20 for k, v
in arg.items():
21 if isinstance(v, dict):
23 elif isinstance(v, list):
26 if isinstance(elm, dict):
35 dict.__init__(new, *args_, **kw)
43 return self._cached_hash
44 except AttributeError:
49 return "frozendict(%s)" % dict.__repr__(self)