[Web-SIG] PEP 444 (aka Web3)

Tarek Ziadé ziade.tarek at gmail.com
Thu Sep 16 15:11:30 CEST 2010


On Thu, Sep 16, 2010 at 2:57 PM, Masklinn <masklinn at 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.ronacher at 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


More information about the Web-SIG mailing list