We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1d3f91 commit 0ae862cCopy full SHA for 0ae862c
ngcsimlib/compilers/process_compiler/op_compiler.py
@@ -1,5 +1,8 @@
1
from ngcsimlib.operations.baseOp import BaseOp
2
3
+def _make_lambda(s):
4
+ return lambda current_state, **kwargs: current_state[s.path]
5
+
6
def compile(op):
7
"""
8
compiles the operation down to its execution order
@@ -15,7 +18,7 @@ def compile(op):
15
18
if isinstance(s, BaseOp):
16
19
arg_methods.append(compile(s))
17
20
else:
- arg_methods.append(lambda current_state, **kwargs: current_state[s.path])
21
+ arg_methods.append(_make_lambda(s))
22
23
def compiled(current_state, **kwargs):
24
argvals = [m(current_state, **kwargs) for m in arg_methods]
0 commit comments