def __setitem__(self, key, value): if self._read_only: self._read_only_error() dict.__setitem__(self, key, value)