whist_core.util

Collection of utility functions.

Functions

enforce_str_on_dict(dictionary, keys)

Forces a dictionary to use string values instead of objects for the given keys.

Module Contents

whist_core.util.enforce_str_on_dict(dictionary, keys)

Forces a dictionary to use string values instead of objects for the given keys. :param dictionary: which needs transformation :param keys: that values needed to be transformed :return: the above dictionary with values changes to string

Parameters:
  • dictionary (dict)

  • keys (Iterable[str])

Return type:

dict