From f21ab7ca426048a66640c8651bb6b015485a9770 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 5 Mar 2016 13:07:04 +0200 Subject: [PATCH] Add __getitem__ and __setitem__ for WorldDictProxy. --- koperkapel/world.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koperkapel/world.py b/koperkapel/world.py index 2272a7a..d682949 100644 --- a/koperkapel/world.py +++ b/koperkapel/world.py @@ -124,6 +124,12 @@ class WorldDictProxy(WorldBaseProxy): value = self._state.get(name) return _maybe_subproxy(self, name, value) + def __setitem__(self, name, value): + return self.__setattr__(name, value) + + def __getitem__(self, name): + return self.__getattr__(name) + class WorldListProxy(WorldBaseProxy): """ World list proxy that records changes and produces events. """ -- 2.34.1