Raymond Hettinger wrote:
No thanks. The resolution of this one was that windowing iterables is
not a good idea. It is the natural province of sequences, not
iterables. With sequences, it is a matter of using an index and
offset. With iterables, there is a great deal of data shifting.
On Thu, May 25, 2006, Torsten Marek wrote:
Some open question remain:
- should iwindow return lists or tuples?
- what happens if the length of the iterable is smaller than the window size,
and no padding is specified? Is this an error? Should the generator return no
value at all or one
Aahz [EMAIL PROTECTED] wrote:
Some open question remain:
- should iwindow return lists or tuples?
- what happens if the length of the iterable is smaller than the
window size, and no padding is specified? Is this an error? Should
the generator return no value at all or one window that is too
Aahz [EMAIL PROTECTED] wrote:
Some open question remain:
- should iwindow return lists or tuples?
- what happens if the length of the iterable is smaller than the
window size, and no padding is specified? Is this an error? Should
the generator return no value at all or one window that is too
Raymond Hettinger wrote:
Aahz [EMAIL PROTECTED] wrote:
Some open question remain:
- should iwindow return lists or tuples?
- what happens if the length of the iterable is smaller than the
window size, and no padding is specified? Is this an error? Should
the generator return no value at all
From: Nick Coghlan [EMAIL PROTECTED]
A python-dev Google search for itertools window found me your original
suggestion to include Jack Diedrich's itertools.window in Python 2.3 (which
was only deferred because 2.3 was already past beta 1 at that point).
I couldn't find any discussion of the
Hi,
in the last time, I've found myself reimplementing a generator that provides a
sliding-window-view over a sequence, and I think this function is of a greater
usefullness, so that it might be included in itertools.
Basically, what the generator does it return all m consecutive elements from a