[Web-SIG] Future of WSGI
henry at precheur.org
Wed Nov 25 00:00:06 CET 2009
On Tue, Nov 24, 2009 at 11:16:05PM +0100, Sylvain Hellegouarch wrote:
> Though it shouldn't be considered as a problem, the fact that probably
> no existing framework actually use the raw dictionary (there is, in
> almost all cases, a wrapping into a friendlier object), one might wonder
> why keeping such a low level interface rather than directly provide a
> higher level interface is a good idea. After all creating those
> dictionaries for no good reason aside from sending them to the next
> layer which will map them into a WebOb, a yaro, a cherrypy request, or
> zope request, etc. seems slightly pointless
1. Would you say that POSIX is useless because there are lots of
libraries and applications build on top of it? Why not implement
those libraries and applications directly without using POSIX?
2. Guess what: WebOb, Werkzeug, Yaro, Django, CherryPy, and the others
have a different interfaces for their Request/Response objects.
Because for Request/Response there's hardly one-size fits all.
There's certainly some common ground, but every framework has
> (I'm not versed into Python internals, but doesn't it have also a cost
> of creating rather useless objects repeatedly like that?)
The dictionary is passed as a reference like every Python objects. So it
doesn't cost anything to use it instead of an object.
More information about the Web-SIG