On Jul 19, 2016 10:51 AM, "Serhiy Storchaka" email@example.com wrote:
On 18.07.16 01:21, Wes Turner wrote:
There are a number of generic implementations of these sequence
Aren't all these implementations works with iterables and iterators?
On Jul 17, 2016 3:23 PM, "Serhiy Storchaka" <firstname.lastname@example.org mailto:email@example.com> wrote:
Maybe it's time to add a new module for sequence-specific functions
(seqtools?). It should contain at least two classes or fabric functions:
- A view that represents a sliced subsequence. Lazy equivalent of
seq[start:end:step]. This feature is implemented in third-party module dataview .
The result of itertools.islice() is not a sequence.
- A view that represents a linear sequence as 2D array. Iterating
this view emits non-intersecting chunks of the sequence. For example it can be used for representing the bytes object as a sequence of 1-byte bytes objects (as in 2.x), a generalized alternative to iterbytes() from PEP 467 .
toolz.itertoolz.partition() is just a generator.
so you're looking for something like strided memoryviews for nonsequential access over sequences/iterables which are sequential? sort of like a bitmask?
Python-ideas mailing list Pythonfirstname.lastname@example.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/