aboutsummaryrefslogtreecommitdiff
path: root/ch1p/state.py
diff options
context:
space:
mode:
Diffstat (limited to 'ch1p/state.py')
-rw-r--r--ch1p/state.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ch1p/state.py b/ch1p/state.py
index 1ea2373..587b31c 100644
--- a/ch1p/state.py
+++ b/ch1p/state.py
@@ -39,6 +39,9 @@ class State:
def __setitem__(self, key, value):
self._data[key] = value
+ def __contains__(self, key):
+ return key in self._data
+
def __delitem__(self, key):
if key in self._data:
- del self._data[key] \ No newline at end of file
+ del self._data[key]