
June 19, 2009
8:41 a.m.
Mike Steder wrote:
On Jun 18, 2009, at 4:02 PM, Terry Reedy wrote:
This is similar, I believe, to functools.partial except that the wrapping is total rather than partial and the wrapped call is in __iter__ instead of __call__.
Would this be a sensible addition to functools, say, or is the use case too rare?
My first thought on reading this was that it reminded me of itertools.cycle so it might be a reasonable fit in itertools.
I'd call it a "reiterable" or perhaps "reiterator".
I like that better.
Your untested sample code worked nicely for me. ;-)
Great.