def update(self, elements=()): self._elements.update(OrderedDict.fromkeys(elements))
def replace(self, elements=()): e = self._elements e.clear() e.update(OrderedDict.fromkeys(elements))
def __init__(self, elements=()): self._elements = OrderedDict.fromkeys(elements) self._current = None