[Python-ideas] Aid reiteration with new class: gfic
Terry Reedy
tjreedy at udel.edu
Fri Jun 19 08:41:01 CEST 2009
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.
More information about the Python-ideas
mailing list