- qspec.combine_dicts ( dicts , key_lists , operator = '+' , short_keys = True )[source]
-
- Parameters:
-
- dictslist
A list of dictionaries to be combined.
- key_listsIterable
A list of Iterables of the same lengths which include keys from 'a'. Must have the same length as 'dicts'.
- operatorstr
The operator which is used to combine the key_lists.
- short_keysbool
Whether to just use the keys of the first key_list or representations of the entire operations as the new keys.
- Returns:
-
- outdict | ValueError
A dictionary of the shape {key_lists[0] + key_lists[1] + ... : dicts[0][key_lists[0]] + dicts[1][key_lists[1]] + ... } if operator == '+'.