[Python-ideas] Sequence views

Nick Coghlan ncoghlan at gmail.com
Tue Jul 19 00:41:51 EDT 2016


On 18 July 2016 at 08:21, Wes Turner <wes.turner at gmail.com> wrote:
> There are a number of generic implementations of these sequence algorithms:
>
> * http://toolz.readthedocs.io/en/latest/api.html#itertoolz
> * https://github.com/kachayev/fn.py#itertools-recipes
> * http://funcy.readthedocs.io/en/stable/seqs.html
>   * http://docs.python.org/2/reference/expressions.html#slicings
>   * https://docs.python.org/2/library/itertools.html#itertools.islice
>   * https://docs.python.org/3/library/itertools.html#itertools.islice

I think the existence of multiple implementations in the context of
larger libraries lends weight to the notion of a "seqtools" standard
library module that works with arbitrary sequences, just as itertools
works with arbitrary iterables.

I don't think combining these algorithms with the "algorithms that
work with arbitrary mappings" classes would make sense - for better or
for worse, I think the latter is "collections" now, since that's also
where the dict variants live (defaultdict, OrderedDict, Counter).

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list