maps.utils
Module Contents
Functions
|
Convert an iterable to a human-readable string. |
|
Recursively update a dictionary with keys and values from another dictionary. |
- maps.utils.list_to_human(iterable, conjunction='and', oxford_comma=False)
Convert an iterable to a human-readable string.
- Parameters:
iterable (list or tuple) – The list of strings to convert to a single natural language string.
conjunction (str, optional) – The conjunction with which to join the last two elements of the list, for example “and” (default).
oxford_comma (bool, optional) – If True, an “Oxford comma” will be added before the conjunction when there are three or more elements in the list. Default is False.
- maps.utils.recursive_dict_update(original_dict, update_dict)
Recursively update a dictionary with keys and values from another dictionary.
- Parameters:
original_dict (dict) – The original dictionary to be updated (in place).
update_dict (dict) – The dictionary containing keys to be updated in the original dictionary.