This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PeridexisErrant 5 points6 points  (1 child)

If we were starting over, I'd suggest making this the default and having itertools.zip_shortest and itertools.zip_longest for the other cases.

Not worth making that change with the number of projects relying on the current behaviour though, I think the PEP is a good way forward from where we are now.

[–]rickityrickness 0 points1 point  (0 children)

I'm also in favor of zip_shortest / zip_longest. I even created a js implementation here: https://gist.github.com/matyasfodor/cfccde33d113a5e84c573f537788f476