whylogs.api.logger.experimental.logger.actor.list_util
#
Module Contents#
Functions#
|
Given a list of items, return a tuple of: |
|
Given a list of items, return a generator that yields tuples. This is a generator version of |
Attributes#
- whylogs.api.logger.experimental.logger.actor.list_util.K#
- whylogs.api.logger.experimental.logger.actor.list_util.get_like_items(items: List[K]) Tuple[Optional[List[K]], Optional[Type[K]], List[K]] #
Given a list of items, return a tuple of:
A list of the items that are of the same type. It will take items from the input until it encounters an item that is not of the same type.
The type of the items in the first list
The remaining items in the list
This is most useful when K is a union type but also works when K is a single type, or just an optional.
- Parameters
items (List[K]) –
- Return type
Tuple[Optional[List[K]], Optional[Type[K]], List[K]]