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

Method dump

Lib/pickle.py:487–500  ·  view source on GitHub ↗

Write a pickled representation of obj to the open file.

(self, obj)

Source from the content-addressed store, hash-verified

485 self.memo.clear()
486
487 def dump(self, obj):
488 """Write a pickled representation of obj to the open file."""
489 # Check whether Pickler was initialized correctly. This is
490 # only needed to mimic the behavior of _pickle.Pickler.dump().
491 if not hasattr(self, "_file_write"):
492 raise PicklingError("Pickler.__init__() was not called by "
493 "%s.__init__()" % (self.__class__.__name__,))
494 if self.proto >= 2:
495 self.write(PROTO + pack("<B", self.proto))
496 if self.proto >= 4:
497 self.framer.start_framing()
498 self.save(obj)
499 self.write(STOP)
500 self.framer.end_framing()
501
502 def memoize(self, obj):
503 """Store an object in the memo."""

Callers 6

__setitem__Method · 0.45
_dumpFunction · 0.45
_dumpsFunction · 0.45
write_resultsMethod · 0.45
stopTestRunMethod · 0.45
json_dumpFunction · 0.45

Calls 7

saveMethod · 0.95
packFunction · 0.90
hasattrFunction · 0.85
PicklingErrorClass · 0.85
start_framingMethod · 0.80
end_framingMethod · 0.80
writeMethod · 0.45

Tested by 1

stopTestRunMethod · 0.36