openmnglab.util.dicts#
Functions
|
|
|
Gets any value mapped by one of the existing keys if it exists in the mapping :param map: the mapping to work on :param keys: keys to look for in the mapping :param default: default value to return when none of the given keys exist in the mapping :return: an existing value of any of the given keys or the default |
|
Returns any of the given keys if they exist in the mapping :param map: mapping in which the keys should be contained :param keys: key to check for in the mapping :return: anyone of the given keys that exists or None if no key exists |
|
groups the given vals in a dictionary by the key returned from the key getter. |
|
Equivalant of dict.setdefault with a factory instead of a value. |