Graham Dumpleton <> added the comment:

I would say that using:

    def __iter__(self):
        for item in self.generator:
            yield item

would be a fairly common recipe for implementing WSGI middleware wrappers 
wouldn't it. The generator which is wrapped by this could just as well be 
start_response() on first call.

Couldn't a generator just as easily be streaming data as well and exhaust all 
memory? Not sure I see the difference really.

Repoze Bugs <>
Repoze-dev mailing list

Reply via email to