Dict Ops#

apply_on_dict(dict_obj, fn, return_as_dict=False, *args, **kwargs)[source]#

Applies an operation defined by fn on all the entries in a dectionary.

  • dict_obj (_type_) -- _description_

  • fn (Callable) -- method to apply on dictionary entries. The signature must be fn(key, value, *args, **kwargs). where *args and **kwargs are forwarded from apply_on_dict method to fn.

  • return_as_dict (bool, optional) -- If True a new dictionary with modified entries is returned.


_type_ -- _description_