it doesn't work ;) [class recursive function]
python at mrabarnett.plus.com
Fri Sep 17 19:28:13 CEST 2010
On 17/09/2010 17:55, Ethan Furman wrote:
> MRAB wrote:
>> On 16/09/2010 00:23, Ethan Furman wrote:
>>> I need some fresh eyes, or better brains, or both!
>> 'next_item' is a generator, but it's just calling itself and discarding
>> the result. I think it should be yielding the results to its caller.
>> That fix gives me 7 sections in total.
> Thanks, M!
> Some further reading on generators has helped clarify the issue for me.
> I had forgotten that the initial call to a generator only sets it up,
> and then returns the generator function itself, which then needs to be
> iterated through.
> Thanks for the reminder!
> Still early in the morning for me, so just in case I didn't phrase it
> well, my thanks are sincere.
> My apologies if this shows up twice, I haven't seen my other post yet
> and it's been 27 hours.
That's probably because you sent it directly to me.
More information about the Python-list