[Patches] [ python-Patches-756253 ] itertools roundrobin() and window()
SourceForge.net
noreply@sourceforge.net
Wed, 18 Jun 2003 13:11:41 -0700
Patches item #756253, was opened at 2003-06-17 16:35
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=756253&group_id=5470
Category: Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Diederich (jackdied)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: itertools roundrobin() and window()
Initial Comment:
a patch to add the roundrobin() and window() objects to
the itertools module. Hettinger has already seen the
implementation of roundrobin, but not window.
test_itertools.py in a seperate patch
----------------------------------------------------------------------
>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-06-18 15:11
Message:
Logged In: YES
user_id=80475
*Please post the tests to this patch and close the other patch.
*Add a documentation patch to this patch
*Let's drop the addition of window(). The C code for it is less
than beautiful and offers only a minimal performance gain
over the pure python equivalent. I've added the pure python
version to the docs so folks can cut and paste it if they need
it. Sorry for the wild goose chase (I had expected the C
version to be much cleaner and faster and that the python
verions would've been harder -- actual code was needed for
me to see it).
* In roundrobin_next(), replace the % operator with:
if (lz->iternum==lz->itersize) lz-iternum=0;
* In roundrobin_next(), remove the extra blank line
following "long listsize;"
* Fixup the indentation, currently it is a mix of spaces and
tabs. It should be just pure tabs.
* Replace the variable name 'lz' with 'rr'. I should have
changed that in other places too but for new code it
should be fixed.
* 'unti' is mispelled in the docstring.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=756253&group_id=5470