projects
/
koperkapel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4eb5a9f
)
Add __getitem__ and __setitem__ for WorldDictProxy.
author
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 11:07:04 +0000
(13:07 +0200)
committer
Simon Cross
<hodgestar@gmail.com>
Sat, 5 Mar 2016 11:07:04 +0000
(13:07 +0200)
koperkapel/world.py
patch
|
blob
|
history
diff --git
a/koperkapel/world.py
b/koperkapel/world.py
index 2272a7a3f01c1df2a695552e109fc6123c1c2888..d68294949f46a7d520275a19532737cdc02db7c5 100644
(file)
--- 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. """