Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tom Harke
pystencils
Commits
8940c4fe
Commit
8940c4fe
authored
Nov 21, 2016
by
Martin Bauer
Browse files
deepcopy and pickle support for TypedSymbol and Field.Access
parent
f9bbace0
Changes
2
Hide whitespace changes
Inline
Side-by-side
field.py
View file @
8940c4fe
...
...
@@ -226,6 +226,9 @@ class Field:
return
obj
def
__getnewargs__
(
self
):
return
self
.
name
,
self
.
offsets
,
self
.
index
__xnew__
=
staticmethod
(
__new_stage2__
)
__xnew_cached_
=
staticmethod
(
cacheit
(
__new_stage2__
))
...
...
typedsymbol.py
View file @
8940c4fe
...
...
@@ -24,3 +24,7 @@ class TypedSymbol(sp.Symbol):
superClassContents
=
list
(
super
(
TypedSymbol
,
self
).
_hashable_content
())
t
=
tuple
(
superClassContents
+
[
hash
(
self
.
_dtype
)])
return
t
def
__getnewargs__
(
self
):
return
self
.
name
,
self
.
dtype
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment