2010/7/15 Zhang Huangbin <[email protected]>:
> In cookbook "Understand URL handling" (http://webpy.org/cookbook/
> url_handling ):
>
> # ----
> You can utilize the power of regular expressions to design more
> flexible url patterns. For example, /(test1|test2) will catch either /
> test1 or /test2.
> # ----
>
> But not work with webpy-0.34. Error msg:
>
> GET() takes exactly 1 argument (2 given)

The regular expression groups are passed as argument to the GET
function. If you don't want that to happen, then use non grouping
version of parenthesis. For example "/(?:test1|test2).

For more details, see:
http://docs.python.org/howto/regex.html#non-capturing-and-named-groups

Anand

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to