emodpy.collections_utils module¶
-
emodpy.collections_utils.
cut_iterable_to
(obj: Iterable, to: int) → Tuple[Union[List, Mapping], int]¶ 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, getter: callable = None, sep: str = '.')¶