emodpy.collections_utils module#

emodpy.collections_utils.cut_iterable_to(obj: Iterable, to: int) Tuple[List | Mapping, int][source]#

Cut an iterable to a certain length.

Parameters:
  • obj – The iterable to cut.

  • to – The number of elements to return.

Returns:

A list or dictionary (depending on the type of object) of elements and the remaining elements in the original list or dictionary.

emodpy.collections_utils.deep_get(d, key, default: callable | None = None, getter: callable | None = None, sep: str = '.')[source]#
emodpy.collections_utils.deep_set(d, key, value, default: callable | None = None, getter: callable | None = None, setter: callable | None = None, sep: str = '.')[source]#
emodpy.collections_utils.deep_del(d: dict, key, getter: callable | None = None, deleter: callable | None = None, sep: str = '.')[source]#