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

Method load

Lib/pickle.py:1300–1328  ·  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

1298 self.fix_imports = fix_imports
1299
1300 def load(self):
1301 """Read a pickled object representation from the open file.
1302
1303 Return the reconstituted object hierarchy specified in the file.
1304 """
1305 # Check whether Unpickler was initialized correctly. This is
1306 # only needed to mimic the behavior of _pickle.Unpickler.dump().
1307 if not hasattr(self, "_file_read"):
1308 raise UnpicklingError("Unpickler.__init__() was not called by "
1309 "%s.__init__()" % (self.__class__.__name__,))
1310 self._unframer = _Unframer(self._file_read, self._file_readline)
1311 self.read = self._unframer.read
1312 self.readinto = self._unframer.readinto
1313 self.readline = self._unframer.readline
1314 self.metastack = []
1315 self.stack = []
1316 self.append = self.stack.append
1317 self.proto = 0
1318 read = self.read
1319 dispatch = self.dispatch
1320 try:
1321 while True:
1322 key = read(1)
1323 if not key:
1324 raise EOFError
1325 assert isinstance(key, bytes_types)
1326 dispatch[key[0]](self)
1327 except _Stop as stopinst:
1328 return stopinst.value
1329
1330 # Return a list of items pushed in the stack after last MARK instruction.
1331 def pop_mark(self):

Callers 14

read_codeFunction · 0.45
__getitem__Method · 0.45
set_locationMethod · 0.45
nextMethod · 0.45
previousMethod · 0.45
firstMethod · 0.45
lastMethod · 0.45
_loadFunction · 0.45
_loadsFunction · 0.45
_mac_ver_xmlFunction · 0.45
__init__Method · 0.45
startTestRunMethod · 0.45

Calls 5

hasattrFunction · 0.85
UnpicklingErrorClass · 0.85
_UnframerClass · 0.85
isinstanceFunction · 0.85
readFunction · 0.50

Tested by 1

startTestRunMethod · 0.36