[Web-SIG] yield considered harmful (was: x-wsgiorg.flush)

Rob De Almeida roberto at dealmeida.net
Fri Oct 5 16:57:43 CEST 2007

Phillip J. Eby wrote:
> I mean that you can't write a WSGI 2.0 application using a single 
> generator function, because it has to return a tuple, not an 
> iterator.  This will discourage people from thinking "yield" is a 
> good way to build up their output, instead of using a StringIO or 
> ''.join() on a list of strings.

Could you explain why using 'yield' is not recommended? Just curious, 
because I use it all the time.


More information about the Web-SIG mailing list