diff --git a/loopy/preprocess.py b/loopy/preprocess.py index 2ed004e078964dc71cb967512f6a21dbde2fcc6c..7b05efd0b0639d6fb098bbc92a99ea29e323a7b6 100644 --- a/loopy/preprocess.py +++ b/loopy/preprocess.py @@ -2270,7 +2270,10 @@ class ArgDescriptionInferer(CombineMapper): assignee_id_to_descr[-i-1] = ValueArgDescriptor() # gathering all the descriptors - combined_arg_id_to_descr = {**arg_id_to_descr, **assignee_id_to_descr} + # TODO: I dont like in place updates. Change this to somthing else. + # Perhaps make a function? + combined_arg_id_to_descr = arg_id_to_descr.copy() + combined_arg_id_to_descr.update(assignee_id_to_descr) # specializing the function according to the parameter description new_scoped_function = ( diff --git a/loopy/type_inference.py b/loopy/type_inference.py index 861e59852e797d74fde11d902f1b2f57b795c1a9..2d35d7cfa3412da58624270bd3df9ebf67daa9e9 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -630,7 +630,7 @@ def infer_unknown_types(kernel, expect_completion=False): new_arg_dict[name] = item.copy(dtype=new_dtype) else: raise LoopyError("unexpected item type in type inference") - # TODO: I dont like in place updates. Change this to something + # TODO: I dont like in-place updates. Change this to something # else. Perhaps add a function for doing this, which does it # using a bunch of copies? specialized_functions.update(new_specialized_functions)