MCPcopy Create free account
hub / github.com/RefactoringGuru/design-patterns-python / save

Method save

src/Memento/Conceptual/main.py:64–71  ·  view source on GitHub ↗

EN: Saves the current state inside a memento. RU: Сохраняет текущее состояние внутри снимка.

(self)

Source from the content-addressed store, hash-verified

62 return "".join(sample(ascii_letters, length))
63
64 def save(self) -> Memento:
65 """
66 EN: Saves the current state inside a memento.
67
68 RU: Сохраняет текущее состояние внутри снимка.
69 """
70
71 return ConcreteMemento(self._state)
72
73 def restore(self, memento: Memento) -> None:
74 """

Callers 1

backupMethod · 0.80

Calls 1

ConcreteMementoClass · 0.85

Tested by

no test coverage detected