On Thu, Sep 16, 2010 at 2:57 PM, Masklinn <maskl...@masklinn.net> wrote: > On 2010-09-16, at 18:08 , Tarek Ziadé wrote: >> On Thu, Sep 16, 2010 at 1:57 PM, Armin Ronacher >> <armin.ronac...@active-4.com> wrote: >>> Hi, >>> >>> On 9/16/10 1:44 PM, Tarek Ziadé wrote: >>>> I propose to write in the PEP that a middleware should provide an >>>> "app" attribute to get the wrapped application or middleware. >>>> It seems to be the most common name used out there. >>> >>> What about middlewares that encapsulate more than one application? >> >> True... I don't know what's the best option here.. I guess we need to >> provide all children so one may visit the whole graph. > That would require a hypothetical self.app to always be a list, or at least > an iterable, right?
I would prefer a get_application(environ=None) iterator that would reach the final application depending on the environment, and return only one app or middleware per level, but I am not sure... -- Tarek Ziadé | http://ziade.org _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com