[Web-SIG] Proposal: wsgi.url_vars

Christopher Lenz cmlenz at gmx.de
Sun Oct 22 14:28:24 CEST 2006

Am 21.10.2006 um 19:49 schrieb Ian Bicking:
> If a dispatcher (like `routes <http://routes.groovie.org/>`_ or
> `selector <http://lukearno.com/projects/selector/>`_) pulls named
> information out of the portion of the request path it parses, it  
> can put
> that information into a dictionary in ``environ['wsgi.url_vars']``.

While I think this is a great idea in general, I don't like that this  
is limited to "named information".

In the kind of dispatching I normally use, there's only one or maybe  
two parts of the URL that I want to receive as parameters. I like  
saving the overhead of making those named groups in regexes, and  
instead just use unnamed groups as positional arguments.

So not supporting both positional and named arguments limits the  
usefulness of this specification IMHO. How about making  
'wsgi.url_vars' a tuple of the form "(args, kwargs)" (the first a  
list or tuple, the second a dict)?

Christopher Lenz
   cmlenz at gmx.de

More information about the Web-SIG mailing list