MCPcopy Index your code
hub / github.com/python/cpython / save_bytearray

Method save_bytearray

Lib/pickle.py:896–904  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

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:

Callers 1

save_picklebufferMethod · 0.95

Calls 3

save_reduceMethod · 0.95
memoizeMethod · 0.95

Tested by

no test coverage detected