Wut? Class with item assignments for context.

This commit is contained in:
Alex Root Junior 2017-12-03 00:48:01 +02:00
parent ed6ae575d1
commit 4ee54ea4e6

View file

@ -114,3 +114,25 @@ def check_configured():
:return:
"""
return get_value(CONFIGURED)
class _Context:
"""
Other things for interactions with the execution context.
"""
def __getitem__(self, item):
return get_value(item)
def __setitem__(self, key, value):
set_value(key, value)
def __delitem__(self, key):
del_value(key)
@staticmethod
def get_context():
return get_current_state()
context = _Context()