[Web-SIG] PEP 444 (aka Web3)

chris.dent at gmail.com chris.dent at gmail.com
Mon Sep 20 11:35:12 CEST 2010


On Sun, 19 Sep 2010, Ian Bicking wrote:

> On Sun, Sep 19, 2010 at 11:32 AM, Chris McDonough <chrism at plope.com> 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.
>>
>> We can't really mandate this because middleware is not required to be an
>> instance.  It can be a function.
>>
>
> We could suggest it, and suggest the attribute name.  Composites, lazy
> loading middleware, or a bunch of other situations can break it... but it's
> nice for introspection tools to at least be able to attempt to run down the
> chain.  Middleware is almost always a closure if it's a function, I believe,
> so you could still do:

If the goal here is to write a spec, then I would prefer that spec
say what must be done and what must not be done, not what may be
done, could be done or is suggested as perhaps a best practice.
Those sorts of things belong in communication that is out of band of
the spec.

-- 
Chris Dent                                   http://burningchrome.com/
                                 [...]


More information about the Web-SIG mailing list