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!

--
~Ethan~

Still early in the morning for me, so just in case I didn't phrase it
well, my thanks are sincere.

PS
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.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to