It would be useful if the variable names in routing rules could begin
with an underscore (just as Python variables can). I don't see that it
would break anything, and it's a one-character fix:


diff -r 92c738ae0044 werkzeug/routing.py
--- a/werkzeug/routing.py       Thu Sep 16 21:16:57 2010 +0200
+++ b/werkzeug/routing.py       Sat Oct 09 16:55:24 2010 -0400
@@ -116,7 +116,7 @@
         (?:\((?P<args>.*?)\))?                  # converter arguments
         \:                                      # variable delimiter
     )?
-    (?P<variable>[a-zA-Z][a-zA-Z0-9_]*)         # variable name
+    (?P<variable>[a-zA-Z_][a-zA-Z0-9_]*)         # variable name
     >
 ''', re.VERBOSE)
 _simple_rule_re = re.compile(r'<([^>]+)>')

(BTW, the registration on the Werkzeug Trac is broken.)

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to