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

Method load

Lib/pickle.py:1326–1354  ·  view source on GitHub ↗

Read a pickled object representation from the open file. Return the reconstituted object hierarchy specified in the file.

(self)

Source from the content-addressed store, hash-verified

1324 self.fix_imports = fix_imports
1325
1326 def load(self):
1327 """Read a pickled object representation from the open file.
1328
1329 Return the reconstituted object hierarchy specified in the file.
1330 """
1331 # Check whether Unpickler was initialized correctly. This is
1332 # only needed to mimic the behavior of _pickle.Unpickler.dump().
1333 if not hasattr(self, "_file_read"):
1334 raise UnpicklingError("Unpickler.__init__() was not called by "
1335 "%s.__init__()" % (self.__class__.__name__,))
1336 self._unframer = _Unframer(self._file_read, self._file_readline)
1337 self.read = self._unframer.read
1338 self.readinto = self._unframer.readinto
1339 self.readline = self._unframer.readline
1340 self.metastack = []
1341 self.stack = []
1342 self.append = self.stack.append
1343 self.proto = 0
1344 read = self.read
1345 dispatch = self.dispatch
1346 try:
1347 while True:
1348 key = read(1)
1349 if not key:
1350 raise EOFError
1351 assert isinstance(key, bytes_types)
1352 dispatch[key[0]](self)
1353 except _Stop as stopinst:
1354 return stopinst.value
1355
1356 # Return a list of items pushed in the stack after last MARK instruction.
1357 def pop_mark(self):

Callers 15

mainFunction · 0.45
mainFunction · 0.45
load_config_tomlFunction · 0.45
should_build_libraryFunction · 0.45
update_test_planFunction · 0.45
wasi_sdkFunction · 0.45
host_tripleFunction · 0.45
read_codeFunction · 0.45
_loadFunction · 0.45
_loadsFunction · 0.45
load_statsMethod · 0.45
do_readMethod · 0.45

Calls 3

UnpicklingErrorClass · 0.85
_UnframerClass · 0.85
readFunction · 0.50

Tested by

no test coverage detected