MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / __init__

Method __init__

cloudpickle/cloudpickle.py:1332–1340  ·  view source on GitHub ↗
(self, file, protocol=None, buffer_callback=None)

Source from the content-addressed store, hash-verified

1330 raise pickle.PicklingError(msg) from e
1331
1332 def __init__(self, file, protocol=None, buffer_callback=None):
1333 if protocol is None:
1334 protocol = DEFAULT_PROTOCOL
1335 super().__init__(file, protocol=protocol, buffer_callback=buffer_callback)
1336 # map functions __globals__ attribute ids, to ensure that functions
1337 # sharing the same global namespace at pickling time also share
1338 # their global namespace at unpickling time.
1339 self.globals_ref = {}
1340 self.proto = int(protocol)
1341
1342 if not PYPY:
1343 # pickle.Pickler is the C implementation of the CPython pickler and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected