On Dec 7, 2014 8:31 AM, "Ned Batchelder" <n...@nedbatchelder.com> wrote: > NOTE: THIS EXAMPLE IS HORRIBLE. This code is crazy-confusing, and should never have been used as an example of iteration. It layers at least three iterations on top of each other, making it very difficult to see what is going on. It uses "while iters" where "while True" would do exactly the same thing (iters will never be false).
That's not quite correct; the "while iters" actually guards against the case where the passed args are empty. With no sub-iterators, no StopIteration would ever be raised, and the result would be an infinite generator of empty tuples. The "while iters" makes it return immediately instead. So it seems this example is even more confusing than you thought.
-- https://mail.python.org/mailman/listinfo/python-list