Skip to content
Snippets Groups Projects
Commit 8940c4fe authored by Martin Bauer's avatar Martin Bauer
Browse files

deepcopy and pickle support for TypedSymbol and Field.Access

parent f9bbace0
No related merge requests found
...@@ -226,6 +226,9 @@ class Field: ...@@ -226,6 +226,9 @@ class Field:
return obj return obj
def __getnewargs__(self):
return self.name, self.offsets, self.index
__xnew__ = staticmethod(__new_stage2__) __xnew__ = staticmethod(__new_stage2__)
__xnew_cached_ = staticmethod(cacheit(__new_stage2__)) __xnew_cached_ = staticmethod(cacheit(__new_stage2__))
......
...@@ -24,3 +24,7 @@ class TypedSymbol(sp.Symbol): ...@@ -24,3 +24,7 @@ class TypedSymbol(sp.Symbol):
superClassContents = list(super(TypedSymbol, self)._hashable_content()) superClassContents = list(super(TypedSymbol, self)._hashable_content())
t = tuple(superClassContents + [hash(self._dtype)]) t = tuple(superClassContents + [hash(self._dtype)])
return t return t
def __getnewargs__(self):
return self.name, self.dtype
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