MCPcopy Index your code
hub / github.com/RustPython/RustPython / save_bytes

Method save_bytes

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

Source from the content-addressed store, hash-verified

856 self.write(BINBYTES + pack("<I", n) + obj)
857
858 def save_bytes(self, obj):
859 if self.proto < 3:
860 if not obj: # bytes object is empty
861 self.save_reduce(bytes, (), obj=obj)
862 else:
863 self.save_reduce(codecs.encode,
864 (str(obj, 'latin1'), 'latin1'), obj=obj)
865 return
866 self._save_bytes_no_memo(obj)
867 self.memoize(obj)
868 dispatch[bytes] = save_bytes
869
870 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