Package pypat :: Package behavioral :: Module memento :: Class Memento
[hide private]
[frames] | no frames]

Class Memento

source code

object --+
         |
        Memento


Memento class as part of the Memento design pattern.

- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}

Instance Methods [hide private]
 
__init__(self, state)
Initialize a new Memento instance.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  state

Inherited from object: __class__

Method Details [hide private]

__init__(self, state)
(Constructor)

source code 

Initialize a new Memento instance.

Parameters:
  • state (dict) - The state to save in this Memento.
Overrides: object.__init__

Property Details [hide private]

state

Get Method:
unreachable.state(self)