On 2009-06-10, Ian Bicking <ianb@???> wrote:
>
> OK, one more webob decorator idea: making the decorator an attribute
> of the Request class. This is what werkzeug does, which means that
> it's very natural to use a subclass of Request. In werkzeug it is
> called application, so it's like:
>
> import webob
> @webob.Request.application
> def myapp(req):
> return webob.Response(...)
>
> Any thoughts on this? Request is of course a pretty big class
> already, but then as a result this isn't proportionally much of an
> increase in size ;) Middleware would work the same way.
Cons: It looks a bit ugly when no subclass is needed, "request
application" doesn't sound right and subclassing the decorator itself
is harder this way.
Overall I think these things deserve to be in their own / global namespace.
Also, nothing wrong with @wsgify(Request2) IMO.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???
To unsubscribe from this group, send email to paste-users+unsubscribe@???
For more options, visit this group at
http://groups.google.com/group/paste-users?hl=en
-~----------~----~----~----~------~----~------~--~---