[issue17343] Add a version of str.split which returns an iterator

Gregory P. Smith report at bugs.python.org
Mon Mar 4 03:31:47 CET 2013


Gregory P. Smith added the comment:

The bytes (and bytearray?) version of this should generate memoryview's instead of new bytes objects to avoid a copy.

While not required, It'd be useful if the implementation of this pre-scanned the data internally so that the length of the generated sequence was known up front.  This could imply an internal bitset of vector of split indices is kept for the life of the generator (implementation detail left up to the implementor) if scanning over the input data more than once is undesirable.

Start with a pure python proof of concept to work everywhere, then write a native version.

----------
nosy: +gregory.p.smith
stage:  -> needs patch
versions: +Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17343>
_______________________________________


More information about the Python-bugs-list mailing list