Why does this implementation of izip() not work?
<p>To better understand Python's generator I'm trying to implement facilities in the <code>itertools</code> module, and get into trouble with <code>izip</code>:</p>

<pre><code>def izip(*iterables):
    its = tuple(iter(it) for it in iterables)
    while True:
        yield tuple(next(it) for it in its)  # ERROR
        # yield tuple(map(next, its))  # OK
</code></pre>

<p>My code uses the ERROR line, and the reference implementation (given in the manual) uses the OK line, not considering other tiny differences. With this snippet:</p>

<pre><code>for x in izip([1, 2, 3], (4, 5)):
    print x
</code></pre>

<p>My code outputs:</p>

<pre><code>(1, 4)
(2, 5)
(3,)
()
()
...  # indefinite ()
</code></pre>

<p>, while the expected output is:</p>

<pre><code>(1, 4)
(2, 5)
</code></pre>

<p>What's wrong with my code, please?</p>
