[Web-SIG] [server-side] request/response objects

Gregory (Grisha) Trubetskoy grisha at modpython.org
Fri Oct 24 19:36:01 EDT 2003


For what it's worth, I never liked the request/response separation either.
I like a single object from which you can read() and to which you can
write(), just like a file. Imagine if for file IO you had to have an
object to read and another one to write?

(I would agree that perhaps "request" is a misnomer, but I can't think of
anything better)

On Fri, 24 Oct 2003, Bill Janssen wrote:

> > When you stop and think about it: *every* request object will have a
> > matching response object. Why have two objects if they come in pairs? You
> > will never see one without the other, and they are intrinsically tied to
> > each other. So why separate them?
> >
>
> Mainly because they are two separate concepts.  For instance, in my
> code, I always pass two arguments; one is the response, which the user
> manipulates to send back something to the caller, and the other is the
> request, which is basically a dictionary of all parameter values, plus
> a few extra special ones like 'path'.
>
> Bill
>
> _______________________________________________
> Web-SIG mailing list
> Web-SIG at python.org
> Web SIG: http://www.python.org/sigs/web-sig
> Unsubscribe: http://mail.python.org/mailman/options/web-sig/grisha%40modpython.org
>



More information about the Web-SIG mailing list