list_to_dict¶
-
class
maze.core.utils.config_utils.
list_to_dict
(list_or_dict: Union[list, Mapping])¶ Convert lists to int-indexed dicts.
Code is simplified by supporting only one universal data structure instead of implementing code paths for lists and dicts separately.
- Parameters
list_or_dict – The list to convert to dict. If it is already a dict, the dict is returned without modification.
- Returns
The passed list as dict.