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

Method save_pers

Lib/pickle.py:640–650  ·  view source on GitHub ↗
(self, pid)

Source from the content-addressed store, hash-verified

638 return None
639
640 def save_pers(self, pid):
641 # Save a persistent id reference
642 if self.bin:
643 self.save(pid, save_persistent_id=False)
644 self.write(BINPERSID)
645 else:
646 try:
647 self.write(PERSID + str(pid).encode("ascii") + b'\n')
648 except UnicodeEncodeError:
649 raise PicklingError(
650 "persistent IDs in protocol 0 must be ASCII strings")
651
652 def save_reduce(self, func, args, state=None, listitems=None,
653 dictitems=None, state_setter=None, *, obj=None):

Callers 1

saveMethod · 0.95

Calls 5

saveMethod · 0.95
strFunction · 0.85
PicklingErrorClass · 0.85
writeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected