complete brain fart, it doesn't loop

Chris Angelico rosuav at gmail.com
Sun Jul 27 14:10:47 EDT 2014


On Mon, Jul 28, 2014 at 4:07 AM, Peter Otten <__peter__ at web.de> wrote:
> By the way, Python has something similar to a function that temporarily
> interrupts execution but preserves state. It's called generator.

Yeah, but I have a suspicion his web framework (which he hasn't
identified, but I suspect *any* web framework) won't be looking for a
generator :) More likely, what he wants is to collect up the return
values in a list, and then return ''.join() that list.

ChrisA



More information about the Python-list mailing list