Dict Ops#
- apply_on_dict(dict_obj, fn, return_as_dict=False, *args, **kwargs)[source]#
Applies an operation defined by
fnon all the entries in a dectionary.- Parameters
dict_obj (_type_) -- _description_
fn (Callable) -- method to apply on dictionary entries. The signature must be
fn(key, value, *args, **kwargs). where*argsand**kwargsare forwarded fromapply_on_dictmethod tofn.return_as_dict (bool, optional) -- If True a new dictionary with modified entries is returned.
- Returns
_type_ -- _description_