(dict)
| 15 | |
| 16 | |
| 17 | def meshgrid(dict): |
| 18 | if len(dict) == 0: |
| 19 | yield {} |
| 20 | return |
| 21 | |
| 22 | key = next(iter(dict)) |
| 23 | values = dict[key] |
| 24 | sub_dict = dict.copy() |
| 25 | sub_dict.pop(key) |
| 26 | |
| 27 | if not isinstance(values, list): |
| 28 | values = [values] |
| 29 | for value in values: |
| 30 | for result in meshgrid(sub_dict): |
| 31 | result[key] = value |
| 32 | yield result |
| 33 | |
| 34 | |
| 35 | def load_config(cfg_file): |
nothing calls this directly
no outgoing calls
no test coverage detected