Package paramz :: Package core :: Module pickleable :: Class Pickleable
[hide private]
[frames] | no frames]

Class Pickleable

source code


Make an object pickleable (See python doc 'pickling').

This class allows for pickling support by Memento pattern. _getstate returns a memento of the class, which gets pickled. _setstate(<memento>) (re-)sets the state of the class to the memento

Instance Methods [hide private]
 
__init__(self, *a, **kw)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
pickle(self, f, protocol=-1)
:param f: either filename or open file object to write to.
source code
 
copy(self, memo=None, which=None)
Returns a (deep) copy of the current parameter handle.
source code
 
__deepcopy__(self, memo) source code
 
__getstate__(self) source code
 
__setstate__(self, state) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *a, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

pickle(self, f, protocol=-1)

source code 

:param f: either filename or open file object to write to.
          if it is an open buffer, you have to make sure to close
          it properly.
:param protocol: pickling protocol to use, python-pickle for details.

copy(self, memo=None, which=None)

source code 

Returns a (deep) copy of the current parameter handle.

All connections to parents of the copy will be cut.

:param dict memo: memo for deepcopy :param Parameterized which: parameterized object which started the copy process [default: self]