Comment

Anonymous

The reason you need to add __deepcopy__ is that your __getattr__ is buggy. Try changing it to this instead:

def __getattr__(self, key):
if key in self:
return self[key]
raise AttributeError(key)