Commit 46b0c57f authored by Andreas Freise's avatar Andreas Freise
Browse files

adding deepcopy fix to new branch

parent 6c9a39bd
......@@ -209,6 +209,19 @@ class Component(object):
del self._params[:]
self.__removed = True
def __deepcopy__(self, memo):
cls = self.__class__
result = cls.__new__(cls)
memo[id(self)] = result
for k, v in self.__dict__.items():
setattr(result, k, deepcopy(v, memo))
for p in result._params:
return result
class AbstractMirrorComponent(Component):
__metaclass__ = abc.ABCMeta
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment