This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Create a real zip iterator object; not using itertools.izip
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, holmesbj
Priority: normal Keywords: patch

Created on 2006-08-24 22:14 by holmesbj, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
iterzip.patch holmesbj, 2006-08-24 22:14 Patch against r51572
iterzip2.patch holmesbj, 2006-08-24 23:58 Revised patch against r51572
Messages (5)
msg50990 - (view) Author: Brian Holmes (holmesbj) Date: 2006-08-24 22:14
This patch adds a new zipiterobject type to
iterobject.c so that we do not import itertools.izip to
do our iterative zip.

There is added that is a stripped down
version of the itertools test.

It's my first patch so go easy on me. ;)
msg50991 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2006-08-24 22:23
Logged In: YES 

I get a fatal error on the DECREF(ro) call at line 419 of
iterobject.c.  Investigating...
msg50992 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2006-08-24 22:59
Logged In: YES 

Deleting that line (line 419) fixes the problem.  Then all
tests pass.  The patch has small style issues though, and
I'm not sure whether the zip iter ought to have a
__length_hint__ method at all.
msg50993 - (view) Author: Brian Holmes (holmesbj) Date: 2006-08-24 23:58
Logged In: YES 

Removed the __length_hint__ stuff which clears up the
uninitialized ro which caused the seg fault.
Changed zip_create_iter to _PyZip_Create.
Added result into zipiter_traverse and zipiter_dealloc.
msg50994 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2006-08-25 23:27
Logged In: YES 

I've made some small changes and checked it in (r51620):

- fixed a few odd whitespace cases, e.g.
    for(i=0 ;
    for (i = 0;

- disabled the specific type error

- rearranged the code so the type object is last;
  this reduces the number of forward decls needed

- shortened a long line
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43895
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2006-08-24 22:14:44holmesbjcreate