[Python-Dev] [Web-SIG] Adding wsgiref to stdlib (original) (raw)
Phillip J. Eby pje at telecommunity.com
Sat Apr 29 01:48:58 CEST 2006
- Previous message: [Python-Dev] [Web-SIG] Adding wsgiref to stdlib
- Next message: [Python-Dev] [Web-SIG] Adding wsgiref to stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 05:47 PM 4/28/2006 -0500, Ian Bicking wrote:
It will still be only a couple lines less than prefix matching.
That's beside the point. Prefix matching is inherently a more complex concept, and more likely to be confusing, without introducing much in the way of new features. If I want to dispatch /foo/bar, why not just use:
AppMap(foo=AppMap(bar=whatever))
So, I don't see prefix matching as introducing anything that's worth the extra complexity. If somebody needs a high-performance prefix matcher, they can get yours from Paste.
If I was going to include a more sophisticated dispatcher, I'd add an ordered regular expression dispatcher, since that would support use cases that the simple or prefix dispatchers would not, but it would also support the prefix cases without nesting.
Another issue with your implementation is the use of keyword arguments for the path mappings, even though path mappings have no association with keyword arguments or valid Python identifiers.
That was for brevity; it should probably also take a mapping argument.
- Previous message: [Python-Dev] [Web-SIG] Adding wsgiref to stdlib
- Next message: [Python-Dev] [Web-SIG] Adding wsgiref to stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]