
New submission from Eli Bendersky <eliben@gmail.com>: Regarding the sample code in: http://docs.python.org/library/itertools#itertools.izip_longest If an IndexError is raised inside an iterator in the "equivalent" code from the docs, the generator stops and the error is swallowed. If an IndexError is raised inside an iterator in the "izip_longest_next" code in CPython's "Modules/itertoolsmodule.c", the generator stops and the error propagates. --- Reported by Adam Forsyth on the docs mailing list. More details in this SO discussion: http://stackoverflow.com/questions/7392902/izip-longest-in-itertools-how-doe... ---------- assignee: docs@python components: Documentation messages: 144228 nosy: docs@python, eli.bendersky priority: normal severity: normal status: open title: Bug in equivalent code for itertools.izip_longest versions: Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13003> _______________________________________