(self, obj)
| 894 | self.write(BYTEARRAY8 + pack("<Q", n) + obj) |
| 895 | |
| 896 | def save_bytearray(self, obj): |
| 897 | if self.proto < 5: |
| 898 | if not obj: # bytearray is empty |
| 899 | self.save_reduce(bytearray, (), obj=obj) |
| 900 | else: |
| 901 | self.save_reduce(bytearray, (bytes(obj),), obj=obj) |
| 902 | return |
| 903 | self._save_bytearray_no_memo(obj) |
| 904 | self.memoize(obj) |
| 905 | dispatch[bytearray] = save_bytearray |
| 906 | |
| 907 | if _HAVE_PICKLE_BUFFER: |
no test coverage detected