(self, x: _RawValue)
| 59 | return [self._tobytes(x) for x in _value] |
| 60 | |
| 61 | def _tobytes(self, x: _RawValue) -> bytes: |
| 62 | if isinstance(x, bytes): |
| 63 | return x |
| 64 | if isinstance(x, str): |
| 65 | return x.encode(self.encoding) |
| 66 | if isinstance(x, int): |
| 67 | return str(x).encode(self.encoding) |
| 68 | raise TypeError(f"Unsupported value type: {type(x)}") |
| 69 | |
| 70 | def __getitem__(self, key: AnyStr) -> bytes | None: |
| 71 | try: |