[issue21744] itertools.islice() goes over all the pre-initial elements even if the iterable can seek
R. David Murray
report at bugs.python.org
Fri Jun 13 14:56:55 CEST 2014
R. David Murray added the comment:
Then don't use itertools for that case. itertools is designed for working with *arbitrary* iterables, and arbitrary iterables are not seekable.
I'll leave it to Raymond to decide if it is worth making a special-case optimization :)
----------
nosy: +r.david.murray, rhettinger
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21744>
_______________________________________
More information about the Python-bugs-list
mailing list