Skip to content

dict_helpers.kfilter_dict

Full path: schola.core.utils.dict_helpers.kfilter_dict

Filter a nested dict by key predicate.

kfilter_dict(func, input_dict, any_key = True)

Parameters

  • func (callable) - Predicate on keys at each nesting level.

  • input_dict (dict) - Possibly nested mapping.

  • any_key (bool, default: True) - Forwarded to DIterator.kfilter.