This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients cvrebert, david.lindquist, docs@python,, larry, rhettinger
Date 2019-08-22.10:05:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks for the suggestion.  I appreciate it even though I've decided to keep the current recipe.

While he proposed recipe is really good at eliminating exhausted input sources, it is slower at its core task of yielding outputs (which is typically the important part).

The O(n) step in the current code runs at C speed and is really fast.  On my six year old machine, running :cycle(islice(nexts, num_active))" for 1,000 nexts takes only 186ns.

One other thought:  The existing recipe is also useful for showing off ways to use the itertools (which was really the principal purpose of having a recipes section).
Date User Action Args
2019-08-22 10:05:04rhettingersetrecipients: + rhettinger, larry, cvrebert, docs@python,, david.lindquist
2019-08-22 10:05:04rhettingersetmessageid: <>
2019-08-22 10:05:04rhettingerlinkissue20727 messages
2019-08-22 10:05:04rhettingercreate