[issue11248] Tails of generator get lost under zip()

Ezio Melotti report at bugs.python.org
Sat Feb 19 11:55:26 CET 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

This behavior is documented[0]:
"""The returned list is truncated in length to the length of the shortest argument sequence."""

You can use izip_longest instead[1].

[0]: http://docs.python.org/library/functions.html#zip
[1]: http://docs.python.org/library/itertools.html#itertools.izip_longest

----------
nosy: +ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11248>
_______________________________________


More information about the Python-bugs-list mailing list