class AttentionBank: | |
def __init__(self): | |
self._data = {} | |
def __getitem__(self, key): | |
return self._data[key] | |
def __setitem__(self, key, value): | |
self._data[key] = value | |
def get(self, key, default=None): | |
return self._data.get(key, default) | |
def clear(self): | |
self._data.clear() | |