iterators#

Replacements for parts of the toolz library.

Functions#

groupby_to_dict(keyfunc, sequence)

A toolz-style groupby implementation.

unique(→ Generator[Any, None, None])

A toolz inspired unique implementation.

groupby_to_dict(keyfunc, sequence)#

A toolz-style groupby implementation.

Returns a dictionary of { key: [group] } instead of iterators.

unique(sequence: Sequence[Any]) Generator[Any, None, None]#

A toolz inspired unique implementation.

Returns a generator of unique elements in the sequence