def accept(self, key: str) -> bool: self.inp += translate_char(key) return True
def accept(self, key): key = translate_char(key) assert len(key) == 1, 'only accepts a single char' self.inp = key return True
def accept(self, key): self.inp += translate_char(key) return True