From a527c078c8f9f9c8c40eece6c5c0151c13a94eea Mon Sep 17 00:00:00 2001 From: Patrick Lauer Date: Wed, 9 Nov 2022 16:25:45 +0100 Subject: [PATCH] Allow downwards compatibility to Python below 3.9 @lu-kas please check if it does the same as you intended. Combining two dicts is only possible from Python 3.9 on. In my proposal you get two lists, combine them and make a dict from it. --- propti/data_structures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/propti/data_structures.py b/propti/data_structures.py index 40d13d5..7a7d46a 100644 --- a/propti/data_structures.py +++ b/propti/data_structures.py @@ -381,7 +381,7 @@ def evaluate_derived_parameters(self): if not skip_evaluation: combined_vars = local_vars if p.evaluate_dict: - combined_vars = combined_vars | p.evaluate_dict + combined_vars = dict(combined_vars.items() | p.evaluate_dict.items()) result = eval(p.evaluate_value, combined_vars) print(f' resulting value {result}') p.value = float(result)