[Python-ideas] itertools.documentation.ncycles is a bit of a sore thumb

Raymond Hettinger raymond.hettinger at gmail.com
Wed Aug 3 23:22:38 CEST 2011


On Aug 3, 2011, at 2:41 PM, Jacob Holm wrote:

> How about using this alternate recipe then:
> 
>  def ncycles(iterable, n):
>      return chain.from_iterable(tee(iterable, n))

Really?  Think about what that does for a large value of n.


Raymond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110803/314a108f/attachment.html>


More information about the Python-ideas mailing list