summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-04-24 10:51:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-04-24 10:51:17 +0200
commit836f5fd8c8e06414c33127d30dbe3788ebc8c33b (patch)
treef33df135e0e31ac7214eece7b9dc607b61ee4e42 /lib
parentd3ad69999ddabd7540ab96a92f56300803f608f5 (diff)
Support arg_to_param_map (dict instead of function)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/automata.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/automata.py b/lib/automata.py
index 0948cee..ff32bf7 100755
--- a/lib/automata.py
+++ b/lib/automata.py
@@ -51,9 +51,10 @@ class Transition:
if self.param_update_function:
return self.param_update_function(param_dict, args)
if self.arg_to_param_map:
- ret = {}
- #for arg_index in range(self.arg_to_param_map):
- # if self.arg_to_param_map[arg_index]
+ ret = param_dict.copy()
+ for k, v in self.arg_to_param_map.items():
+ ret[k] = args[v]
+ return ret
return param_dict
class State: