MCPcopy Index your code
hub / github.com/faif/python-patterns / restore

Function restore

patterns/behavioral/memento.py:15–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13 state = deepcopy(obj.__dict__) if deep else copy(obj.__dict__)
14
15 def restore() -> None:
16 obj.__dict__.clear()
17 obj.__dict__.update(state)
18
19 return restore
20

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected