[Python-ideas] Aid reiteration with new class: gfic

Mike Steder steder at gmail.com
Fri Jun 19 02:59:59 CEST 2009


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".

Your untested sample code worked nicely for me. ;-)

~Mike




More information about the Python-ideas mailing list