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

Method save_bytes

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

Source from the content-addressed store, hash-verified

872 self.write(BINBYTES + pack("<I", n) + obj)
873
874 def save_bytes(self, obj):
875 if self.proto < 3:
876 if not obj: # bytes object is empty
877 self.save_reduce(bytes, (), obj=obj)
878 else:
879 self.save_reduce(codecs.encode,
880 (str(obj, 'latin1'), 'latin1'), obj=obj)
881 return
882 self._save_bytes_no_memo(obj)
883 self.memoize(obj)
884 dispatch[bytes] = save_bytes
885
886 def _save_bytearray_no_memo(self, obj):

Callers 1

save_picklebufferMethod · 0.95

Calls 4

save_reduceMethod · 0.95
_save_bytes_no_memoMethod · 0.95
memoizeMethod · 0.95
strFunction · 0.85

Tested by

no test coverage detected