Re: [Web-SIG] wsgi and generators (was Re: WSGI and start_response)

2010-04-11 Thread Manlio Perillo
P.J. Eby ha scritto: > At 02:04 PM 4/10/2010 +0100, Chris Dent wrote: >> I realize I'm able to build up a complete string or yield via a >> generator, or a whole bunch of various ways to accomplish things >> (which is part of why I like WSGI: that content is just an iterator, >> that's a good thing

Re: [Web-SIG] wsgi and generators (was Re: WSGI and start_response)

2010-04-10 Thread Graham Dumpleton
On 10 April 2010 23:04, Chris Dent wrote: > On Thu, 8 Apr 2010, P.J. Eby wrote: > >> This is also a good time for people to learn that generators are usually a >> *very bad* way to write WSGI apps - yielding is for server push or sending >> blocks of large files, not tiny strings.  In general, if

Re: [Web-SIG] wsgi and generators (was Re: WSGI and start_response)

2010-04-10 Thread P.J. Eby
At 02:04 PM 4/10/2010 +0100, Chris Dent wrote: I realize I'm able to build up a complete string or yield via a generator, or a whole bunch of various ways to accomplish things (which is part of why I like WSGI: that content is just an iterator, that's a good thing) so I'm not looking for a statem

Re: [Web-SIG] wsgi and generators (was Re: WSGI and start_response)

2010-04-10 Thread Dirkjan Ochtman
On Sat, Apr 10, 2010 at 15:04, Chris Dent wrote: > On Thu, 8 Apr 2010, P.J. Eby wrote: >> This is also a good time for people to learn that generators are usually a >> *very bad* way to write WSGI apps - yielding is for server push or sending >> blocks of large files, not tiny strings.  In general

[Web-SIG] wsgi and generators (was Re: WSGI and start_response)

2010-04-10 Thread Chris Dent
On Thu, 8 Apr 2010, P.J. Eby wrote: This is also a good time for people to learn that generators are usually a *very bad* way to write WSGI apps - yielding is for server push or sending blocks of large files, not tiny strings. In general, if you're yielding more than one block, you're almost