[New-bugs-announce] [issue13003] Bug in equivalent code for itertools.izip_longest

Eli Bendersky report at bugs.python.org
Sun Sep 18 06:55:23 CEST 2011


New submission from Eli Bendersky <eliben at 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-does-rasing-indexerror-inside-the-iterator-work

----------
assignee: docs at python
components: Documentation
messages: 144228
nosy: docs at 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 at bugs.python.org>
<http://bugs.python.org/issue13003>
_______________________________________


More information about the New-bugs-announce mailing list