On Fri, Jun 5, 2009 at 12:01 PM, Tres Seaver <tsea...@palladion.com> wrote:
> I'm assuming that we would fix anything in our repository; it
> should even be possible to do so in a BBB-compatible way, e.g.::
> def context_factory(environ=None, **kw):
> match_dict = kw.copy()
> if environ is not None: # called as "root factory"
Ah, right. Cool. Making environ a kw arg preserves backwards compatability
for context factories. So tweaking my suggestion a little bit:
def __call__(self, environ=None, **routes_match):
Replaces concepts of root factory used for traversal and context
factory used for routes, into a single concept. environ is the
WSGI environment, and the match dict from routes matching, if
applicable, is passed in as kw args.
I'm sure Chris M will come up with something completely different.
Repoze-dev mailing list