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

Method __getstate__

Lib/uuid.py:276–282  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

274 return self
275
276 def __getstate__(self):
277 d = {'int': self.int}
278 if self.is_safe != SafeUUID.unknown:
279 # is_safe is a SafeUUID instance. Return just its value, so that
280 # it can be un-pickled in older Python versions without SafeUUID.
281 d['is_safe'] = self.is_safe.value
282 return d
283
284 def __setstate__(self, state):
285 object.__setattr__(self, 'int', state['int'])

Callers 2

__reduce__Method · 0.45
__reduce__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected