(self, obj)
| 884 | dispatch[bytes] = save_bytes |
| 885 | |
| 886 | def _save_bytearray_no_memo(self, obj): |
| 887 | # helper for writing bytearray objects for protocol >= 5 |
| 888 | # without memoizing them |
| 889 | assert self.proto >= 5 |
| 890 | n = len(obj) |
| 891 | if n >= self.framer._FRAME_SIZE_TARGET: |
| 892 | self._write_large_bytes(BYTEARRAY8 + pack("<Q", n), obj) |
| 893 | else: |
| 894 | self.write(BYTEARRAY8 + pack("<Q", n) + obj) |
| 895 | |
| 896 | def save_bytearray(self, obj): |
| 897 | if self.proto < 5: |
no test coverage detected