At 05:39 PM 10/23/2006 -0500, Ian Bicking wrote:
>By using a tuple or list, you can be sure you don't have a sparse list,
>which probably isn't something any system is likely to handle. The
>double underscores kind of mark __args__ as a special kind of key, so
>it's less likely to overlap with a simple named key. Removing it from
>the dict or handling it is special; you don't have to look at all the
>keys to see if any are ints, you just test "'__args__' in url_vars".
>
>Would this satisfy everyone?
Call it "wsgi.url_args", and make it a two-item tuple: *args, **kw. That's
far simpler than any of the wacky encodings proposed so far, and can be
used to invoke a function directly, e.g.:
apply(f, *environ['wsgi.url_args'])
or, less cleverly (i.e. more readably):
args, kw = environ['wsgi.url_args']
f(*args, **kw)
_______________________________________________
Web-SIG mailing list
[email protected]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com