(self, which: Literal["A", "B", "C"])
| 165 | return self.code |
| 166 | |
| 167 | def _new_charset(self, which: Literal["A", "B", "C"]) -> list[int]: |
| 168 | if which == self._charset: |
| 169 | raise ValueError(f"Already in charset {which}") |
| 170 | if which == "A": |
| 171 | code = self._convert("TO_A") |
| 172 | elif which == "B": |
| 173 | code = self._convert("TO_B") |
| 174 | elif which == "C": |
| 175 | code = self._convert("TO_C") |
| 176 | self._charset = which |
| 177 | return [code] |
| 178 | |
| 179 | # to be redefined in subclass if required |
| 180 | def _is_char_fnc1_char(self, char): |
no test coverage detected