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
Sebastian Bindgen
pystencils
Commits
e5700eb4
Commit
e5700eb4
authored
Jul 12, 2019
by
Stephan Seitz
Browse files
Add `get_dummy_symbol`
parent
faf330f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/astnodes.py
View file @
e5700eb4
import
uuid
from
typing
import
Any
,
List
,
Optional
,
Sequence
,
Set
,
Union
import
jinja2
...
...
@@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node):
def
atoms
(
self
,
arg_type
)
->
Set
[
Any
]:
return
self
.
body
.
atoms
(
arg_type
)
|
{
s
for
s
in
self
.
symbols_defined
if
isinstance
(
s
,
arg_type
)}
def
get_dummy_symbol
(
dtype
=
'bool'
):
return
TypedSymbol
(
'dummy%s'
%
uuid
.
uuid4
().
hex
,
create_type
(
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