From 836f5fd8c8e06414c33127d30dbe3788ebc8c33b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 24 Apr 2018 10:51:17 +0200 Subject: Support arg_to_param_map (dict instead of function) --- lib/automata.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') 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: -- cgit v1.2.3