les_iterables package

Submodules:

Summary

__all__ Functions:

alternate_with Generate a series from items, alternating with an alternate item.
append Yield an iterable followed by an item.
append_if Yield an iterable, conditionally followed by an item.
duplicates Find duplicate items.
ensure_contains Yield items, followed by ensured_item, if ensured_item is not already present.
expand_numbered_list Expands a string containing numbered items into a list of integers.
extend Extend an iterable by yielding items returned by a factory.
first_matching The first item matching a predicate.
join_with Generate a series of items, with separators taken from a second series.
nth_matching The nth item matching a predicate.
prepend Yield an item followed by an iterable.
prepend_if Conditionally yield an item, followed by an iterable.
range_from_text A range of integers from a textual description.
reject_falsy Reject those items which evaluate to False in a boolean context.
reject_if Retain those items for which predicate evaluates to True.
reject_truthy Reject those items which evaluate to True in a boolean context.
repeat_first Repeat the first item from an iterable on the end.
retain_falsy Retain those items which evaluate to False in a boolean context.
retain_if Retain those items for which predicate evaluates to True.
retain_truthy Retain those items which evaluate to True in a boolean context.
separate_with Generate a series from items, where the original items are separated by another item.
take_after_inclusive Yield items starting with the first match.
take_after_last_match Yield items in an iterable series after the last matching.
take_before_inclusive Yield items up to and including the first match.
take_between_inclusive A list of items from the first matching to the last matching inclusive.
take_between_inclusive_values A list of items from the first matching to the last matching inclusive.