On Fri, Aug 27, 2010 at 10:57:42AM -0700, Mike Orr wrote:
> Yes, because the same route can't be both redirecting and non-redirecting.
> 
> If you wanted to accept both forms in one route, you could do it with
> a requirement regex.
> 
> map.connect("/c/{id:\d+[_/]\d+}")
...
> PS. I don't know why you don't need the "R" prefix for route patterns
> containing backslashes, but for some reason it seems to work.

Because \d is not a string escape that Python interprets.

  "Unlike Standard C, all unrecognized escape sequences are left in the
   string unchanged, i.e., the backslash is left in the string."
        -- http://docs.python.org/reference/lexical_analysis.html#literals

Marius Gedminas
-- 
I read some mail from Theo De Raadt to my children when they don't eat their
soup.
                -- Poltras on reddit

Attachment: signature.asc
Description: Digital signature

Reply via email to