macpie.lltools.filter_seq_pair#
- macpie.lltools.filter_seq_pair(left, right, intersection=None, left_filter_seq_kwargs={}, right_filter_seq_kwargs={}, **kwargs)#
Filter pair of sequences of strings.
- Parameters:
- leftlist-like of strings
Left sequence to filter
- rightlist-like of strings
Right sequence to filter
- intersectionbool, default False
Whether to only return the items common to both, after excluding any values filtered out by the *filter_kwargs params.
- left_filter_seq_kwargsdict
Keyword arguments to pass to underlying
filter_seq()
to be applied to left sequences.- right_filter_seq_kwargsdict
Keyword arguments to pass to underlying
filter_seq()
to be applied to right sequences.- **kwargs
All remaining keyword arguments are passed through to the underlying
filter_seq()
function to be applied to both left and right.
- Returns:
- Tuple[Tuple[str, str], Tuple[str, str]]
((left_items_kept, right_items_kept), (left_items_discarded, right_items_discarded))
See also